The DELETE statement is used to
delete rows in a table.
DELETE FROM table_name WHERE column_name = some_value |
Person:
LastName |
FirstName |
Address |
City |
Nilsen |
Fred |
Kirkegt 56 |
|
Rasmussen |
Nina |
Stien 12 |
|
"Nina Rasmussen" is
going to be deleted:
DELETE FROM Person WHERE LastName = 'Rasmussen' |
Result
LastName |
FirstName |
Address |
City |
Nilsen |
Fred |
Kirkegt 56 |
|
It is possible to delete all rows
in a table without deleting the table. This means that the table structure,
attributes, and indexes will be intact:
DELETE FROM table_name or DELETE * FROM table_name |