logo

AQA A-Level Computer Science practice

Write an SQL statement to delete the row from Customer whose CustomerID is 45. Explain why the condition is important.

Try the question first, then check the answer and practise the same topic again.

At a glance

Question

Type

practice

Style

Topic

Structured Query Language (SQL)

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.

Related flashcards

No flashcards are published for this page yet.

Related practice questions