logo

Question detail

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

Try the question, check the answer, then read the explanation to understand the curriculum point.

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.

Model answer

What a good answer should say

  • DELETE FROM Customer WHERE CustomerID = 45;

Explanation

Why this works

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.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions

No questions are published for this page yet.