Answered step by step
Verified Expert Solution
Link Copied!

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

  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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL/PHP Database Applications

Authors: Brad Bulger, Jay Greenspan, David Wall

2nd Edition

0764549634, 9780764549632

More Books

Students also viewed these Databases questions

Question

1. Explain the 2nd world war. 2. Who is the father of history?

Answered: 1 week ago