January 2005
Beginner to intermediate
928 pages
22h 14m
English
While the INSERT, UPDATE, and DELETE statements change data in the specified tables, they only return a message indicating whether the statement completed successfully. If the statement completed successfully, you need to issue a separate SQL statement to find out what changed. In the next example, to determine which rows are to be deleted, you first issue a SELECT statement to capture the rows you will delete on the following DELETE statement. Both statements have the same WHERE condition to filter the same rows.
SELECT empno, firstnme, lastname FROM employee WHERE workdept = 'A00'; DELETE FROM employee WHERE workdept = 'A00';
Rather than issuing two separate statements, they can be optimized ...
Read now
Unlock full access