Loading Data Driven Insights
Preparing your learning content.
Preparing your learning content.
A beginner-friendly guide to the SQL DELETE statement, with SQL Server-friendly examples for removing rows from a table safely.
On this page
Jump to a lesson section
The DELETE statement is used to remove rows from a table.
You can use DELETE when you want to delete one row, delete selected rows, remove records by condition, clean unwanted data, or remove row data while keeping the table structure.
A basic DELETE statement names the table and uses a WHERE condition to control which row should be deleted.
DELETE FROM table_name
WHERE condition;
DELETE FROM Employees
WHERE employee_id = 6;
employee_id = 6.We will delete Ethan Moore’s row from this table.
This query deletes only one row because the WHERE condition matches one employee.
DELETE FROM Employees
WHERE employee_id = 6;
This query deletes only one row because the WHERE condition matches one employee.
Without WHERE, SQL may delete every row from the table.
DELETE FROM Employees;
DELETE FROM Employees
WHERE employee_id = 6;
DELETE removes rows from a table. Always use a clear WHERE condition when you only want to delete specific rows.
SQL Roadmap Progress
Topic 25 of 111
23% complete