MCQ King
31 – IF WHILE BLOCK MCQ
Best of luck!
1 / 25
1. What is the primary purpose of a block of statements in SQL Server?
2 / 25
2. Which SQL statement is used to define a block of statements in SQL Server?
3 / 25
3. In SQL Server, what is the primary purpose of the IF statement?
4 / 25
4. What is the syntax for the IF statement in SQL Server?
5 / 25
5. In SQL Server, what is the purpose of the ELSE clause in an IF statement?
6 / 25
6. In SQL Server, which keyword is used to exit a loop in a WHILE statement?
7 / 25
7. What is the primary purpose of the WHILE statement in SQL Server?
8 / 25
8. What is the syntax for the WHILE statement in SQL Server?
9 / 25
9. In SQL Server, what is the purpose of the BREAK statement within a WHILE loop?
10 / 25
10. In SQL Server, what is the purpose of the CONTINUE statement within a WHILE loop?
11 / 25
11. What happens if the condition in a WHILE statement is initially false in SQL Server?
12 / 25
12. In SQL Server, what is the primary use of the GOTO statement within a block of statements?
13 / 25
13. In SQL Server, what is the purpose of the THROW statement within a block of statements?
14 / 25
14. In SQL Server, what is the primary purpose of the RETURN statement within a block of statements?
15 / 25
15. In SQL Server, how is the execution flow controlled within a block of statements?
16 / 25
16. In SQL Server, what is the primary use of the WAITFOR statement within a block of statements?
17 / 25
17. What is the purpose of the RAISEERROR statement within a block of statements in SQL Server?
18 / 25
18. In SQL Server, what is the primary use of the TRY…CATCH block within a block of statements?
19 / 25
19. In SQL Server, which keyword is used to define a label within a block of statements?
20 / 25
20. In SQL Server, what is the purpose of the COMMIT statement within a block of statements?
21 / 25
21. What is the primary purpose of the ROLLBACK statement within a block of statements in SQL Server?
22 / 25
22. In SQL Server, what is the primary use of the PRINT statement within a block of statements?
23 / 25
23. What is the primary purpose of the THROW statement within a TRY…CATCH block in SQL Server?
24 / 25
24. In SQL Server, what is the primary use of the @@ERROR function within a block of statements?
25 / 25
25. What is the primary purpose of the GOTO statement within a TRY…CATCH block in SQL Server?
Your score is
Restart quiz