Stats

69 Contributors: 13 Sunday, October 9, 2016
Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Rip Tutorial: riptutorial@gmail.com
Roadmap: roadmap

DELETE

Syntax

  • DELETE [ LOW_PRIORITY ] [ QUICK ] [ IGNORE ] FROM table [WHERE conditions] [ORDER BY expression [ ASC | DESC ]] [LIMIT number_rows]; /// Syntax for delete row(s) from single table

Parameters

ParameterDetails
LOW_PRIORITYIf LOW_PRIORITY is provided, the delete will be delayed until there are no processes reading from the table
IGNOREIf IGNORE is provided, all errors encountered during the delete are ignored
tableThe table from which you are going to delete records
WHERE conditionsThe conditions that must be met for the records to be deleted. If no conditions are provided, then all records from the table will be deleted
ORDER BY expressionIf ORDER BY is provided, records will be deleted in the given order
LIMITIt controls the maximum number of records to delete from the table. Given number_rows will be deleted.

Related Examples