Exam-style question
Try this first
Write an SQL statement to delete the row from Customer whose CustomerID is 45. Explain why the condition is important.
Answer and explanation
Concise answer
DELETE FROM Customer WHERE CustomerID = 45;
Why this is correct
DELETE FROM identifies the table from which a row is to be removed. The WHERE condition restricts the deletion to the row whose CustomerID is 45. Without a condition, the statement could delete every row in the table.
Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.
Common mistake
No common mistake is linked to this question yet.
