Suppose you want to select distinct salaries working in department 101 from the 'Employee' relation. What will be the correct order of writing the query?
(A) FROM Employee
(B) SELECT
(C) WHERE
(D) DISTINCT Salary
(E) Dept_ID= 101
Suppose you want to select distinct salaries working in department 101 from the 'Employee' relation. What will be the correct order of writing the query?
(A) FROM Employee
(B) SELECT
(C) WHERE
(D) DISTINCT Salary
(E) Dept_ID= 101
Solution
✅ Correct Option: 3
The query is , and SQL requires the clauses in this fixed order: SELECT, then FROM, then WHERE.
Correct order:
(B) SELECT
(D) DISTINCT Salary
(A) FROM Employee
(C) WHERE
(E) Dept_ID= 101
Options 1 and 2: both start with FROM, but SQL starts with SELECT.
Option 4: it puts the condition before the table name, which is not valid syntax.
Related questions:
2026: 11 May Shift 2
2026: 13 May Shift 2