To remove a row from a table, use the DELETE statement. The following DELETE statement deletes all employees with the last name of Markey:
DELETE FROM EMPDB.EMPLOYEE
WHERE LAST_NAME_0415 = 'MARKEY';
This example and other examples that use last name to locate an employee are flawed, in that, all employees with the last name specified in the Where clause are processed by the SQL statement. The user should refine the Where clause to return only the precise row(s) to change. In the case of the EMPLOYEE table, the user could use the EMP_ID_0415 column, which for this table is the unique key.
|
Copyright © 2013 CA.
All rights reserved.
|
|