Difference between revisions of "Delete Queries"
Line 5: | Line 5: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | or: | ||
<syntaxhighlight lang=sql> | <syntaxhighlight lang=sql> |
Revision as of 22:31, 21 December 2016
Used for deleting rows from a table.
DELETE FROM table WHERE column1=value1;
or:
DELETE FROM table WHERE column1=value1 AND column2=value2;
- Not specifying which records to delete will result in every record being deleted
- The same can be achieved with 'DELETED * FROM table'
- This process cannot be undone
- Not to be confused with DROP, for deleting columns and tables.