MCQ King
34 – TRY CATCH THROW MCQ
Best of luck!
1 / 23
1. In SQL Server, what is the primary purpose of the TRY…CATCH construct?
2 / 23
2. Which SQL statement is used to begin a TRY block in SQL Server?
3 / 23
3. What is the primary purpose of the CATCH block in SQL Server’s TRY…CATCH construct?
4 / 23
4. In SQL Server, what is the primary purpose of the THROW statement?
5 / 23
5. Which keyword is used to re-raise an exception within a CATCH block in SQL Server?
6 / 23
6. In SQL Server, what is the purpose of the @@ERROR function?
7 / 23
7. In SQL Server, which keyword is used to specify a custom error message when using the THROW statement?
8 / 23
8. What is the primary use of the TRY…CATCH construct in SQL Server’s error handling?
9 / 23
9. In SQL Server, when does control transfer from the TRY block to the CATCH block?
10 / 23
10. In SQL Server, what happens if no exception occurs in the TRY block and there’s no explicit THROW statement?
11 / 23
11. In SQL Server, what is the primary purpose of the THROW statement with no arguments?
12 / 23
12. What is the primary use of the TRY_CONVERT function in SQL Server’s error handling?
13 / 23
13. In SQL Server, which keyword is used to specify the error number when using the THROW statement to raise an exception?
14 / 23
14. What is the purpose of the SET XACT_ABORT ON statement in SQL Server’s error handling?
15 / 23
15. In SQL Server, what is the primary use of the THROW statement with a custom error severity level?
16 / 23
16. What happens if an unhandled exception occurs in a TRY…CATCH block in SQL Server?
17 / 23
17. In SQL Server, what is the purpose of the THROW statement with a custom state value?
18 / 23
18. What is the primary purpose of the ERROR_MESSAGE() function in SQL Server’s error handling?
19 / 23
19. In SQL Server, which keyword is used to begin a TRY…CATCH block with multiple catch blocks?
20 / 23
20. In SQL Server, what is the purpose of the TRY…CATCH construct when using nested transactions?
21 / 23
21. What is the primary purpose of the ERROR_STATE() function in SQL Server’s error handling?
22 / 23
22. In SQL Server, what is the primary purpose of the TRY…CATCH construct when dealing with batch-level errors?
23 / 23
23. What is the primary purpose of the THROW statement with the option THROW 0 in SQL Server’s error handling?
Your score is
Restart quiz