Question: Write the SQL statements to do the following: a. Add a new attribute OfficeNo to the Employee table to store the office number of employees.

 Write the SQL statements to do the following: a. Add a

Write the SQL statements to do the following: a. Add a new attribute "OfficeNo" to the Employee table to store the office number of employees. "OfficeNo" values can be 3 or 5 characters long, allows null, has a default value of "A-0". The general format of the field is that the first character is an upper-case letter followed by a dash "-", followed by up to 1 to 3 digits. Values that do not have this format must not be allowed when inserting/updating a record in the Employee table. b. Perform a single update on the employee table to set the following office number as follows based on the department of the employees. 2 c. Increase the salary of employees based on the number of people they supervise directly. Employees supervising more than 3 people get a 30\% increase, employees supervising 1 or 2 people get a 20% increase, and employees not supervising anyone get a 10% increase on their original salary

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!