Which of the following statement contains an error?

2022

Which of the following statement contains an error?

  1. A.

    Select * from emp where empid = 10003;

  2. B.

    Select empid from emp where empid = 1006;

  3. C.

    Select empid from emp;

  4. D.

    Select empid where empid = 1009 and last_name = 'GELLER';

Attempted by 1877 students.

Show answer & explanation

Correct answer: D

In SQL, the FROM clause is mandatory when selecting data from a table. Option (D) is missing the FROM emp clause, hence it is syntactically incorrect. All other statements are valid SQL queries.

Explore the full course: Up Lt Grade Assistant Teacher 2025