bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/SQL/SQL Tutorial
SQL•SQL Tutorial

SQL DELETE Statement

Concept visual

SQL DELETE Statement

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

The SQL DELETE Statement

The DELETE

statement is used to delete existing records in a table.

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 used in the examples:

CustomerID

CustomerName

ContactName

Address

City

PostalCode

Country

Alfreds Futterkiste

Maria Anders

Obere Str. 57

Berlin

12209

Germany

Ana Trujillo Emparedados y helados

Ana Trujillo

Avda. de la Constitución 2222 México D.F. 05021

Mexico

Antonio Moreno Taquería

Antonio Moreno

Previous

SQL UPDATE Statement

Next

SQL SELECT TOP, LIMIT and FETCH FIRST