Skip to content

Conversation

@Imran-imtiaz48
Copy link

I combined both table creation queries and the data insertion queries into one unified script, which includes:

  1. Table Creation Statements:

    • EmployeeDemographics table with primary key, NOT NULL constraints, and checks for valid age and gender values.
    • EmployeeSalary table with a primary key, NOT NULL constraints, a CHECK constraint for valid salary, and a foreign key relationship linking EmployeeID to EmployeeDemographics.
  2. Data Insertion Statements:

    • Insert statements for both tables with values provided in a clean and formatted way.

This makes it convenient to run everything at once, creating the tables and populating them with data.

I combined both table creation queries and the data insertion queries into one unified script, which includes:

1. **Table Creation Statements**:
   - `EmployeeDemographics` table with primary key, `NOT NULL` constraints, and checks for valid age and gender values.
   - `EmployeeSalary` table with a primary key, `NOT NULL` constraints, a `CHECK` constraint for valid salary, and a foreign key relationship linking `EmployeeID` to `EmployeeDemographics`.

2. **Data Insertion Statements**:
   - Insert statements for both tables with values provided in a clean and formatted way.

This makes it convenient to run everything at once, creating the tables and populating them with data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant