Question: P 1 . Write the SQL code that will create only the table structure for a table named EMP _ 1 . This table P
P Write the SQL code that will create only the table structure for a table named EMP This table P Using the EMP table, write the SQL code that will add the attributes EMPPCT and PROJNUM
to EMP The EMPPCT is the bonus percentage to be paid to each employec. The new attribute
characteristics are:
P Using the EMP table, write the SQL code to change the EMPPCT value to for the person
whose employee number EMPNUM is
P Using the EMP table, write a single SQL command to change the EMPPCT value to for the
people with employee numbers and
PIO. Using the EMP table, write a single SQL command to change the EMPPCT value to for all
employees who do not currently have a value for EMPPCT
P Using the EMP table, write the SQL command to add to the EMPPCT of the employee whose
name is Maria D Alonzo. Use the employce name in your command to determine the correct
employee.
PI Using a single command sequence with the EMP table, write the SQL code that will change the
project number PROJNUM to for all employees whose job classification JOBCODE is
P Using a single command sequence with the EMP table, write the SQL code that will change the
project number PROJNUM to for all employees whose job classification JOBCODE is or
higher.
P Write the SQL code that will change the PROJNUM to for employees who were hired before
January and whose job code is at least When you finish Problems
and the EMP table will contain the data shown in Figure
Figure : The contents of the the EMP Table
will be a subset of the ERPLOYEE table. The basic ERP table structure is summarized in Table
Use EMPNUM as the primary key. Note that the JOBCODE is the FK to JOB so be certain to enforce
referential integrity. Your code should also prevent null entries in EMPLNAME and EMPFNAME.
Table : The EMP table structure
P Having created the table structure in problem Pl write the SQL code to enter the first two rows
from the table shown in Figure Each row should be inserted individually, without using a
subquery. Insert the rows in the order that they are listed in the figure.
Figure : The contents of the the EMP Table
P Using the EMPLOYEE table that already exists, use a subquery to insert the remaining rows from
the EMPLOYEE table into the EMP table. Remember, your subquery should only retrieve the
columns needed for the EMP table and only the employees shown in Figure
P Write the SQL code to change the job code to for the person whose employee number
EMPNUM is
P Write the SQL code to delete the row for William Smithfield, who was hired on June
and whose job code is Hint: Use logical operators to include all of the information given in
this problem.
P Write the SQL code to create a copy of EMP including all of its data, and naming the copy
EMP
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
