SQL DELETE Statement

The SQL DELETE statement is used to delete records from a database table. It is an important part of any SQL query and is commonly used to clean up data or remove unwanted records. DELETE is a powerful operation and should be used with caution, as it can permanently remove data from a database.

Syntax

DELETE FROM table_name
WHERE condition;
    

Example

DELETE FROM customers
WHERE customer_id = 123;
    

This example deletes the record for the customer with ID 123 from the "customers" table.

Options

There are many other options and clauses that can be used with the DELETE statement, such as JOIN and ORDER BY. You can learn more about these and other advanced topics in our SQL tutorials and references.