SQL Delete Statement
Posted on
< Previous Next >
The DELETE statement in SQL is used to remove existing records from a database table. It allows us to delete one or more rows from a table based on certain conditions.
It's important to note that the DELETE statement removes entire rows from a table, not just specific columns. So if we delete a row using the DELETE statement, all of the data in that row is permanently removed from the table.
Here's an example: Let's say we have a table named "student" with columns "id", "name", "email", "phone", and "address". We can use the DELETE statement to remove the row with an "id" of 1 from the "student" table.
Delete Syntax
DELETE FROM table_name WHERE condition;
We would use the following statement:
DELETE FROM student WHERE id = 5;
OUTPUT

< Previous Next >