|
<< Click to Display Table of Contents >> DELETE statement |
![]() ![]()
|
Deletes one or more rows from a table.
DELETE FROM table_reference
[WHERE predicates]
Use DELETE to delete one or more rows from one existing table per statement.
DELETE FROM "Employee.db"
The optional WHERE clause restricts row deletions to a subset of rows in the table that meet a logical criteria. If no WHERE clause is specified, all rows in the table are deleted. The statement below deletes all of the rows from the EMPLOYEE table if the value in its EmpNo column is found in the result set produced by a SELECT subquery against the OLD_EMPLOYEE table.
DELETE FROM "Employee.db"
WHERE (Empno IN (SELECT Empno FROM "Old_Employee.db"))
The DELETE statement only supports SELECT subqueries in the WHERE clause. References to tables other than the one from which rows are deleted or columns in such tables are only possible in SELECT subqueries.