Delete

<< Click to Display Table of Contents >>

Navigation:  Additional References > Database Primer >

Delete

Previous pageReturn to chapter overviewNext page

 

The SQL Delete statement is used to instruct the database to delete selected table records. Based on our example, let's assume the user had erroneously inserted a record into the Persons database table using the Insert SQL statement. The record in error has the following information: ID: 3. Lastname: Johnson. Firstname: Paul. Address: 1243 Georgetown Dr City: Los Angeles . A SQL Delete statement is then issued to delete the erroneous record:

 

DELETE FROM Persons WHERE ID = '3'

 

This has the effect of removing the database record for Paul Johnson from the database.