DELETE statement

Use the DELETE statement to delete records from a database table. The format of the DELETE statement is:

Copy
DELETE FROM table_name [ WHERE { conditions } ]

Note  The WHERE clause determines which records are to be deleted. If you don’t include the WHERE keyword, all records in the table are deleted (but the table is left intact).

Example

Delete a record from emp table.

Copy
DELETE FROM emp WHERE emp_id = 'E10001'

Each DELETE statement removes every record that meets the conditions in the WHERE clause. In this case, every record having the employee ID E10001 is deleted. Because employee IDs are unique in the Employee table, only one record is deleted.