Question: Write an SQL query to create a schema named Organization in your database Write an SQL query to create a table named Employee in the

  1. Write an SQL query to create a schema named Organization in your database

  1. Write an SQL query to create a table named Employee in the schema named Organization

The table must have 7 attributes namely Employee ID, EmployeeFirstName, EmployeeLastName

EmployeePosition, EmployeeSalary, EmployeeDateHired, EmployeeOfficeNumber

  • Decide about the data types suitable for the columns
  • Make sure that that the following constraints are included while creating the table
  • Employee ID is the primary key. It is also an identity column where the values in this column start with 1000 and increment by 1 for every new employee entry.
  • EmployeeFirstName and EmployeeLastName are not null columns
  • The default value for EmployeePosition is Not Assigned
  • EmployeeSalary should accept decimal values up to 4 decimals and this column should not accept salary less than 1500 dollars
  • EmployeeOfficeNumber is a unique column with default value as 000

  1. Write insert statements to insert 5 rows into the table Employee to insert data about 5 employees. You can make up the data by yourself.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!