The command used to delete records in SQL is DELETE. The syntax of the DELETE command is: DELETE FROM table_name WHERE condition. The condition parameter specifies the record condition to be deleted. If no condition is specified, all records in the table will be deleted.
The command used to delete records in SQL
The command used to delete records in SQL is DELETE.
Syntax
<code class="sql">DELETE FROM table_name WHERE condition;</code>
Parameters
How it works
The DELETE command is passed by specifying an or Multiple conditions to delete records from table. It deletes all records that meet the criteria. If no condition is specified, all records in the table will be deleted, so use caution.
Example
The following query will delete the records of all customers older than 40 years old from the "Customers" table:
<code class="sql">DELETE FROM Customers WHERE Age > 40;</code>
Note Item
The above is the detailed content of What is the command in sql to delete records. For more information, please follow other related articles on the PHP Chinese website!