MS SQL Server – 35 – Stored Procedures MCQ

35 – Stored Procedures MCQ

Best of luck!

1 / 25

1. What is a stored procedure in SQL Server?

2 / 25

2. Which SQL statement is used to create a stored procedure in SQL Server?

3 / 25

3. In SQL Server, what is the primary advantage of using stored procedures?

4 / 25

4. What is the purpose of the EXECUTE statement in SQL Server?

5 / 25

5. In SQL Server, which of the following is true about the parameters of a stored procedure?

6 / 25

6. What is the primary use of OUTPUT parameters in SQL Server stored procedures?

7 / 25

7. In SQL Server, how can you return a result set from a stored procedure?

8 / 25

8. What is the purpose of the RETURN statement in SQL Server stored procedures?

9 / 25

9. In SQL Server, what happens if a stored procedure does not have a RETURN statement?

10 / 25

10. What is the primary purpose of the AS keyword in a CREATE PROCEDURE statement in SQL Server?

11 / 25

11. In SQL Server, what is a parameterized stored procedure?

12 / 25

12. Which of the following is true about input parameters in SQL Server stored procedures?

13 / 25

13. In SQL Server, how can you execute a stored procedure that returns a result set?

14 / 25

14. What is the purpose of the DROP PROCEDURE statement in SQL Server?

15 / 25

15. In SQL Server, what is the primary use of the TRY…CATCH block when calling a stored procedure?

16 / 25

16. How can you pass values to input parameters when executing a stored procedure in SQL Server?

17 / 25

17. What is the purpose of the PRINT statement in SQL Server stored procedures?

18 / 25

18. In SQL Server, how can you pass a NULL value to an input parameter when executing a stored procedure?

19 / 25

19. In SQL Server, what is the primary purpose of the PRINT statement in a stored procedure?

20 / 25

20. What is the primary advantage of using stored procedures for security in SQL Server?

21 / 25

21. In SQL Server, what is the primary purpose of the OUTPUT clause in a stored procedure?

22 / 25

22. What is the primary use of the EXECUTE AS clause in a stored procedure in SQL Server?

23 / 25

23. In SQL Server, what is the purpose of the RECOMPILE option for stored procedures?

24 / 25

24. How can you view the code of an existing stored procedure in SQL Server Management Studio?

25 / 25

25. What is the primary advantage of using stored procedures for code reusability in SQL Server?

Your score is

0%