Loading Data Driven Insights
Preparing your learning content.
Preparing your learning content.
A beginner-friendly guide to the SQL DELETE statement, including basic syntax, WHERE conditions, and a practical SQL Server-style example.
On this page
Jump to a lesson section
The DELETE statement is used to remove rows from a table.
It is commonly used when you need to remove outdated, incorrect, duplicated, or unwanted records from a database.
A DELETE statement usually needs a WHERE condition so SQL knows exactly which row or rows should be removed.
DELETE FROM table_name
WHERE condition;
DELETE FROM Employees
WHERE employee_id = 5;
employee_id is 5.WHERE carefully when deleting specific rows.We will delete one employee from this Employees table.
DELETE.This query deletes the row where employee_id is 5.
DELETE FROM Employees
WHERE employee_id = 5;
employee_id = 5.WHERE condition.After deleting the row, the Employees table no longer contains Sophia Clark.
Without a proper WHERE condition, it can remove more rows than expected.
SQL Roadmap Progress
Topic 9 of 111
8% complete
Next in SQL Roadmap
Continue with the next SQL topic in the recommended roadmap order.
Continue learning →