MySQL DELETE

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

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.


Got any MySQL Question?