MCQ King
23 – Union and Case MCQ
1 / 20
1. What is the purpose of the UNION operator in SQL Server?
2 / 20
2. Which set operator in SQL Server returns all distinct rows from the result set of the first query and all distinct rows from the result set of the second query?
3 / 20
3. What does the INTERSECT operator in SQL Server do?
4 / 20
4. When using the UNION operator in SQL Server, does it include duplicate rows in the result set?
5 / 20
5. Which SQL Server set operator is used to return all rows from the first result set that are not present in the second result set?
6 / 20
6. What is the purpose of the CASE expression in SQL Server?
7 / 20
7. How do you define a simple CASE expression in SQL Server?
8 / 20
8. In a CASE expression, what value is returned if none of the specified conditions is true?
9 / 20
9. Which SQL Server CASE expression is used to compare a single expression with multiple values?
10 / 20
10. What is the primary advantage of using CASE expressions in SQL Server?
11 / 20
11. Which SQL Server set operator returns all rows from both result sets, including duplicates?
12 / 20
12. What is the purpose of the EXCEPT operator in SQL Server?
13 / 20
13. When using the INTERSECT operator in SQL Server, is the order of columns important between the two result sets?
14 / 20
14. In a CASE expression, what keyword is used to specify the value to return when a condition is true?
15 / 20
15. How do you create a searched CASE expression in SQL Server?
16 / 20
16. In a searched CASE expression, can you specify multiple conditions for a single result?
17 / 20
17. What value is returned by a CASE expression if none of the specified conditions is true, and there is no ELSE clause?
18 / 20
18. What is the primary purpose of the COALESCE function in SQL Server?
19 / 20
19. Which SQL Server function is used to handle NULL values within expressions?
20 / 20
20. In a CASE expression, can you use a subquery as a condition?
Your score is
Restart quiz