1 DELETE Deletes a row from a table or view. 2 Environment You can use the DELETE statement: o In interactive SQL o Embedded in host language programs to be precompiled o As part of a procedure in an SQL module o In dynamic SQL as a statement to be dynamically executed 2 Format (B)0DELETE FROM qqwq> <table-name> qqqwqwqqqqqqqqqqqqqqqqqqqqqqqwqk   mq> <view-name> qqqqj mq> <correlation-name> qj x  lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj  mwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwqqqq>   mq> WHERE qwq> predicate qqwqqqqqqqqqqqqqqqqqqqqqqqqqqqwqu   x m> optimize-clause qqqqqqqqqj x   mq> CURRENT OF <cursor-name> qqqqqqqqqqqqqqqqqj    (B)0optimize-clause =            qqwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwqqq>   mq> OPTIMIZE qqwqwq> FOR qwq> FAST FIRST qqqqqqqqwqqqqqqqqqqwqwqj   x x tq> TOTAL TIME qqqqqqqqu   x x  x x mq> SEQUENTIAL ACCESS qj x x  x tq> USING <outline-name> qqqqqqqqqqqqqqqqqqu x  x tq> WITH qwq> DEFAULT qqwq> SELECTIVITY qu x x x tq> SAMPLED qqu x x x x mq> AGGRESSIVE j x x  x mq> AS <query-name> qqqqqqqqqqqqqqqqqqqqqqqj x   mqqqqqqqqqqqqqqqq ATTACH 'ALIAS PERS FILENAME personnel'; SQL> DELETE FROM PERS.EMPLOYEES E cont> WHERE EXISTS ( SELECT * cont> FROM PERS.SALARY_HISTORY S cont> WHERE S.EMPLOYEE_ID = E.EMPLOYEE_ID cont> AND S.SALARY_AMOUNT > 75000 cont> ) ; 7 rows deleted Example 3: Deleting rows from a table specifying an outline name The following example shows the syntax used to define the DEL_ EMP_75000 outline: SQL> CREATE OUTLINE DEL_EMP_75000 cont> FROM cont> (DELETE FROM EMPLOYEES E cont> WHERE EXISTS ( SELECT * cont> FROM SALARY_HISTORY S cont> WHERE S.EMPLOYEE_ID = E.EMPLOYEE_ID cont> AND S.SALARY_AMOUNT > 75000 cont> ); The following query specifies the DEL_EMP_75000 outline: SQL> DELETE FROM EMPLOYEES E cont> WHERE EXISTS ( SELECT * cont> FROM SALARY_HISTORY S cont> WHERE S.EMPLOYEE_ID = E.EMPLOYEE_ID cont> AND S.SALARY_AMOUNT > 75000 cont> ) cont> OPTIMIZE USING DEL_EMP_75000; ~S: Outline DEL_EMP_75000 used . . . 7 rows deleted