Loading

Quipoin Menu

Learn • Practice • Grow

sql / Multi Row Subqueries
mcq
Direction: Choose the correct option

Q1.

What is a multi-row subquery?
A. Returns multiple columns
B. Returns multiple rows
C. Returns multiple databases
D. Returns multiple tables
Direction: Choose the correct option

Q2.

SELECT * FROM employees WHERE salary > ANY (SELECT salary FROM employees WHERE department = 'IT');
What does ANY do?
A. Greater than all values
B. Greater than average
C. Greater than at least one value
D. Greater than minimum
Direction: Choose the correct option

Q3.

SELECT * FROM employees WHERE salary > ALL (SELECT salary FROM employees WHERE department = 'IT');
What does ALL do?
A. Greater than maximum
B. Greater than any value
C. Greater than every value
D. Greater than average
Direction: Choose the correct option

Q4.

What's the difference between IN and EXISTS?
A. IN works with NULL
B. Both same
C. IN checks membership, EXISTS checks existence
D. IN is faster
Direction: Choose the correct option

Q5.

SELECT * FROM employees WHERE dept_id NOT IN (SELECT id FROM departments);
What does this find?
A. Employees in invalid departments
B. Employees in all departments
C. All employees
D. No departments