Vidyalelo
MySQL · Q325

MySQL

Programming · MySQL · question 325

Q325

Which statement is used to delete an existing row from the table?

A.
DELETE
Answer
B.
WHERE
C.
MODIFY
D.
None of the mentioned

Answer: Option A

Solution

Answer: Option A
Solution:
This question is asking about how you remove a specific record (row) from a table in MySQL.

Let's break down the options:

Option A: DELETE - This is the correct answer. The DELETE statement is used to remove rows from a table.

Option B: WHERE - The WHERE clause is used with DELETE to specify which rows to delete. It's like a filter.

Option C: MODIFY - MODIFY is used to change the structure of a table, like adding a new column or changing an existing one. It doesn't remove rows.

Option D: None of the mentioned - This is incorrect because DELETE is the command used to remove rows.

Example:

To delete a row from a table called "students" where the student's ID is 123, you would use:

DELETE FROM students WHERE id = 123;