To remove only the records where the status = 'Inactive' from a table named…

2026

To remove only the records where the status = 'Inactive' from a table named Accounts, which query is correct?

  1. A.

    DELETE FROM Accounts WHERE status = 'Inactive';

  2. B.

    DROP FROM Accounts WHERE status = 'Inactive';

  3. C.

    REMOVE FROM Accounts WHERE status = 'Inactive';

  4. D.

    TRUNCATE Accounts WHERE status = 'Inactive';

Attempted by 377 students.

Show answer & explanation

Correct answer: A

To remove specific records from a table based on a condition, use the DELETE statement with a WHERE clause. The correct syntax is "DELETE FROM Accounts WHERE status = 'Inactive';". This targets only rows matching the condition. Other commands like DROP remove entire objects, TRUNCATE removes all data without conditions, and REMOVE is not standard SQL.

Explore the full course: Up Lt Grade Assistant Teacher 2025