Loading subject…
NOT NULL must be given a value, or the database rejects the whole statement.INSERT INTO Customer (CustomerID, CustomerEmail, CustomerAddress)VALUES (1, '[email protected]', '123 Main St');SET ItemCost = ItemCost * 1.1.UPDATE CustomerSET CustomerEmail = '[email protected]'WHERE CustomerID = 1;DELETE FROM Customer WHERE CustomerID = 1;DELETE FROM Customer; empties the whole table, and the database does not ask you to confirm.| Command | Sublanguage | What is left afterwards |
|---|---|---|
| DELETE FROM Customer WHERE ... | DML | The table, and every row that did not match the condition |
| TRUNCATE TABLE Customer | DDL | The empty table, ready to accept new rows |
| DROP TABLE Customer | DDL | Nothing, the table definition is gone too |