SQL DELETE

The DELETE statement in SQL is used to remove one or more records from a table. You can use it to delete rows based on a specified condition.

Syntax

The basic syntax of the DELETE statement is:


DELETE FROM table_name
WHERE condition;

        

Example

Here is an example of how to use the DELETE statement to remove an employee with a specific ID:


-- Example: Deleting a record
DELETE FROM Employees
WHERE EmployeeID = 1;