MCQ – Multiple choice questions on stored procedure sql and function with answers and explanation. Objective questions are asked in Software jobs written interviews.
Q) A stored procedure in SQL is a___________
- Block of functions
- Group of SQL statements.
Q) Advantage of SQL stored procedure
- Re-use of code
Q) Syntax to create stored procedure is/are
123456CREATE PROCEDURE procedureName ASSQL statements
12345678CREATE PROCEDURE procedureName ASBEGINSQL statementsEND
12345678CREATE PROC procedureName ASBEGINSQL statementsEND
- B & C
- B only
Q) Which statement(S) is/are incorrect
- Stored procedure may return a value and function must return a value.
- Function has only IN parameter.
- Try and Catch can be used with both stored procedure and function.
- Stored procedure has IN and OUT parameter.