Which of the following is an optional statement in an SQL query?
2022
Which of the following is an optional statement in an SQL query?
- A.
SELECT
- B.
FROM
- C.
WHERE
- D.
Both SELECT and FROM
Attempted by 287 students.
Show answer & explanation
Correct answer: C
A basic SQL query commonly has the form SELECT columns FROM table WHERE condition. The WHERE clause is optional because it is needed only when we want to filter rows. Without WHERE, the query can still return rows from the table. Therefore, option C is correct.