Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Rated
Read 69,826 times

Contents

Related Categories

MySQL Tutorial - The DELETE statement

gez

The DELETE statement

The delete statement is used to delete records in a database. The keywords used in a delete statement are summarised in the following table.

Keyword Description
DELETE Deletes the records in one or more tables.
FROM Tables containing the records.
WHERE Criteria to restrict the records deleted.

The following example deletes all records in the search table where the category is Junk.

delete.sql

DELETE FROM search
WHERE Category = 'Junk';

The file may then be used with MySQL as follows:

mysql> \. delete.sql

I'm available for contract work. Please visit Juicify for details.

Comments