DELETE
The DELETE statement removes rows from a table.
Syntax
DELETE
[ FROM ]
table
[ WHERE
expression ]
Example
This example deletes respondent number 603 from VDATA. This was the respondent you added to the table in the INSERT example, and updated in the UPDATE example.
DELETE
FROM vdata
WHERE serial = 603
After running the example, you can check that the record has been deleted using the following query:
SELECT serial AS Serial,
gender AS Gender,
museums AS Museums,
name AS Name,
visits AS Visits,
entrance AS Entrance
FROM vdata
WHERE serial > 601
Here is the result set:
Serial Gender Museums Name Visits Entrance
------ -------- ------------------------------------------------- ------------ ------ --------
602 {female} {northern_gallery} 2 {main}
Respondent 603 is no longer in the table.
See also