Which of the following is using wrong syntax for a SELECT query in SQL?
2023
Which of the following is using wrong syntax for a SELECT query in SQL?
- A.
SELECT * WHERE RNO>100 FROM STUDENT;
- B.
SELECT * FROM STUDENT WHERE RNO>100;
- C.
SELECT * FROM STUDENT WHERE RNO BETWEEN 100 AND 200;
- D.
SELECT * FROM STUDENT WHERE RNO IN (100, 101, 105, 104);
Attempted by 857 students.
Show answer & explanation
Correct answer: A
The correct order of a SELECT query in SQL is: SELECT columns FROM table WHERE condition; In option (1), the WHERE clause is written before FROM, which is syntactically wrong. All other options follow the correct SQL syntax.
A video solution is available for this question — log in and enroll to watch it.