Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
- 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 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
- 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started