DELETE

General Syntax of DELETE

The DELETE command enables you to delete one or more records from a table permanently. You can indicate the records to be deleted using the WHERE clause, which is explained in the next section, and specify the conditions.

The general syntax of a basic DELETE statement is as follows:

    
copy
DELETE FROM {BASE_TABLE_NAME}[WHERE {WHERE_CONDITION}]

Example:

To delete the record of a specific show date in a particular theater from the Movies table, you can execute this query:

    
copy
DELETE FROM Movies WHERE MovieID=2059 AND ShowDate='2018-07-14' AND TheaterID=053

Note: If you specify a string value in the WHERE condition, you must pass it enclosed in a single quotation.

Last Updated 2023-08-28 18:12:09 +0530 +0530