Delete (SQL)
Encyclopedia : D : DE : DEL : Delete (SQL)
A DELETE statement in SQL removes records in a relational database management system.
The DELETE statement has the following form:
DELETEFROMtable_name [WHEREcondition]
WHERE condition will be removed from the table. If the WHERE clause is omitted, all rows in the table are removed.
The DELETE statement does not return any rows; that is, it will not generate a result set.
Executing a DELETE statement may cause triggers to run, which may cause other tables to be updated.
Examples
Delete value Lemon Meringue from table pies, where the column equals flavour:
DELETE FROM pies WHERE flavour='Lemon Meringue';Delete rows in mytable, if the value of mycol is greater than 100.
DELETE FROM mytable WHERE mycol > 100;Delete all rows from mytable:
DELETE FROM mytable;
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
