The SQL DELETE Statement
The SQL DELETE Statement
DELETE Statement
❮ PreviousNext ❯
DELETE Syntax
DELETE FROM table_name WHERE condition;
Note: Be careful when deleting records in a table! Notice the WHERE clause in
the DELETE statement. The WHERE clause specifies which record(s) should be
deleted. If you omit the WHERE clause, all records in the table will be deleted!
Demo Database
Below is a selection from the "Customers" table in the Northwind sample
database:
Example
DELETE FROM Customers WHERE CustomerName='Alfreds Futterkiste';
Try it Yourself »
DELETE FROM table_name;
The following SQL statement deletes all rows in the "Customers" table, without
deleting the table:
Example
DELETE FROM Customers;
Try it Yourself »
Submit Answer »
❮ PreviousNext ❯
COLOR PICKER
LIKE US
Get certified
by completing
a course today!
w3schoolsCERTIFIED.2021
Get started
CODE GAME
Play Game
REPORT ERROR
FORUM
ABOUT
SHOP
Top Tutorials
HTML Tutorial
CSS Tutorial
JavaScript Tutorial
How To Tutorial
SQL Tutorial
Python Tutorial
W3.CSS Tutorial
Bootstrap Tutorial
PHP Tutorial
Java Tutorial
C++ Tutorial
jQuery Tutorial
Top References
HTML Reference
CSS Reference
JavaScript Reference
SQL Reference
Python Reference
W3.CSS Reference
Bootstrap Reference
PHP Reference
HTML Colors
Java Reference
Angular Reference
jQuery Reference
Top Examples
HTML Examples
CSS Examples
JavaScript Examples
How To Examples
SQL Examples
Python Examples
W3.CSS Examples
Bootstrap Examples
PHP Examples
Java Examples
XML Examples
jQuery Examples
Web Courses
HTML Course
CSS Course
JavaScript Course
Front End Course
SQL Course
Python Course
PHP Course
jQuery Course
Java Course
C++ Course
C# Course
XML Course
Get Certified »