header1.html

Monday 22 July 2013

MCQs on Stored Procedures in SQL


1.A stored procedure in SQL is a___________.
A.block of functions
B.group of Transact-SQL statements compiled into a single execution plan.
C.group of distinct SQL statements.
D.None of above
Click for answer 

B.group of Transact-SQL statements compiled into a single execution plan.
2.It is possible to return data (such as an integer or character value) or a cursor variable by using________.
A.IN parameters
B.OUTPUT parameters
C.IN and OUT parameters
D.Return keyword
Click for answer 

B.OUTPUT parameters
3.____________assist in achieving a consistent implementation of logic across applications.
A.Table
B.Functions
C.Stored procedures
D.Views
Click for answer 

C.Stored procedures
4.In SQL Server system stored procedures whose names usually start with__________.
A.sp
B.sp_
C.dbo
D.None of these
Click for answer 

B.sp_
5.Temporary stored procedures are stored in _________ database.
A.master
B.model
C.user specific
D.tempdb
Click for answer 

D.tempdb
6.Benefit(s) of using stored procedures in SQL is/are______
A.They allow modular programming
B.They can reduce network traffic
C.Both A & B
D.Easy for data access.
Click for answer 

C.Both A & B
7.CREATE PROCEDURE statements cannot be combined with other SQL statements in a single batch.True or False?
A.True
B.False
Click for answer 

A.True
8.It is strongly recommended that you do not create any stored procedures using sp_ as a prefix.
A.although the user-created stored procedure prefixed with sp_ may exist in the current database, the master database is always checked first, even if the stored procedure is qualified with the database name.
B.It will not allow to create stored procedure
C.It will get stored in model database
D.The stored procedure will get stored as dbo as the owner.
Click for answer 

A.although the user-created stored procedure prefixed with sp_ may exist in the current database, the master database is always checked first, even if the stored procedure is qualified with the database name.

No comments:

Post a Comment