(10) Using the EMP_2 table, write a single SQL command to change the EMP_PCT values to 5.00...
Question:
11. Using the EMP_2 table, write a single SQL command to change the EMP_PCT value to 10.00 for all employees who do not currently have a value for EMP_PCT.
I've tried this code:
UPDATE EMP_2
SET EMP_PCT = 10.00
WHERE EMP_PCT IS NULL;
But it doesn't work. The following results show:
I've tried (10.00), (10), 10.00, 10, '10.00', '10', and I receive the same results.
----------------------------------------------------------------------------------------------------------------------------------------------------
15. Write the SQL code that will change the PROJ_NUM to 14 for employees who were hired before January 1, 1994, and whose job code is at least 501. When you finish Problems 7–15, the EMP_2 table will contain the data shown in Figure P8.15.
My code:
UPDATE EMP_2
SET PROJ_NUM = 14
WHERE EMP_HIREDATE < '1994-01-01'
AND JOB_CODE >= 501;
Results:
Solve questions 11 and 15.
Database Systems Design Implementation and Management
ISBN: 978-1285196145
11th edition
Authors: Carlos Coronel, Steven Morris