Oracle PL/SQL Tutorial - PL/SQL Delete






Since you created an integrity constraint on the author_books table with a foreign key, you need to delete author's publications before you delete him from the authors table.

Example

The following code is the DML to Delete Publications.

DELETE FROM author_books WHERE id = 300; 

Note

The syntax for the DELETE statement is as follows:


DELETE FROM <table_name> 
WHERE <column_name_N> = <column_value_N>...; 

<table_name> is the name of the table to DELETE FROM <column_name> is one or more columns for which you specify some criteria.

Here is the DML for Deleting Darwen from the Authors Table.

DELETE FROM authors WHERE id = 300;