CIW Course Revision Site

SQL - DELETE Statement

CIW Course in a Nutshell

SQL, DELETE Statement

Removing records from an SQL database table is fairly straight-forward

DELETE FROM MyTable
WHERE ID = 1

The FROM Keyword is optional with Microsoft SQL but not with MySQL. As with any data modification statement the WHERE clause is important to ensure only the desired records are deleted. There is no Undo button here.

There really isn't much else to say about the delete statement, so we'll leave it at that; a nice short chapter.

Footnote: Just noticed that the Table name appears to be case-sensitive in MySQL

Design by Fife Web Design

Certified Internet Webmaster

Page last Edited: 10 May 2006