The DELETE FROM statement is used to delete one or more rows from an existing table in a database.
DELETE FROM table_name WHERE row_name = "value"
You have to delete the record of ID =1002 from a table called customer.
This is what the table looks like.
In order to do that, we have to write the following statement:
DELETE FROM customer WHERE ID = 1002;
Let’s break down our statement:
- DELETE FROM is followed by the name of the table
- WHERE indicates the exact row you want to delete the record from.