InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 51. |
The benefit of using user-defined functions in SQL Server are ____________(a) They allow modular programming(b) They can increase network traffic(c) They allow slower execution(d) All of the mentionedThis question was posed to me during a job interview.This intriguing question originated from User Defined Functions topic in portion Developing with SQL Server of SQL Server |
|
Answer» The CORRECT choice is (a) They allow MODULAR programming |
|
| 52. |
Function cannot be used for __________ statement.(a) Create(b) Drop(c) Select(d) InsertI have been asked this question in class test.This interesting question is from User Defined Functions in division Developing with SQL Server of SQL Server |
|
Answer» The correct OPTION is (d) INSERT |
|
| 53. |
User defined function in SQL Server can return ____________(a) Scalar value(b) Set of values(c) Result set(d) All of the mentionedThis question was posed to me by my college director while I was bunking the class.My question is based upon User Defined Functions topic in section Developing with SQL Server of SQL Server |
|
Answer» Correct option is (d) All of the mentioned |
|
| 54. |
Type of procedure that are based on the CLR (Common Language Runtime) is ____________(a) User Defined Stored Procedure(b) Extended Procedure(c) CLR Stored Procedure(d) System defined ProcedureThe question was asked in homework.My enquiry is from Built in Stored Procedures topic in section Developing with SQL Server of SQL Server |
|
Answer» The correct CHOICE is (c) CLR Stored Procedure |
|
| 55. |
Extended procedures starts with the __________ prefix.(a) sp_(b) xp_(c) clr_(d) all of the mentionedThis question was addressed to me in final exam.I want to ask this question from Built in Stored Procedures topic in division Developing with SQL Server of SQL Server |
|
Answer» The correct ANSWER is (a) sp_ |
|
| 56. |
Nesting limit OF stored procedure is up to ________level.(a) 30(b) 32(c) 34(d) 36This question was addressed to me in exam.Enquiry is from Built in Stored Procedures topic in section Developing with SQL Server of SQL Server |
|
Answer» RIGHT ANSWER is (b) 32 The explanation is: In Sql Server stored PROCEDURE nesting limit is up to 32 LEVELS, but there is no limit on the number of stored procedures that can be invoked with in a store. |
|
| 57. |
System defined Procedure logically appear in ____________(a) sys schema(b) stor schema(c) proc schema(d) all of the mentionedThe question was posed to me in an interview for job.This interesting question is from Built in Stored Procedures topic in portion Developing with SQL Server of SQL Server |
|
Answer» RIGHT choice is (a) sys schema To elaborate: System defined PROCEDURE are physically stored in hidden SQL SERVER Resource Database and logically appear in the sys schema of each user defined and system defined database. |
|
| 58. |
Which of the following stored procedure is already defined in Sql Server?(a) User Defined Stored Procedure(b) Extended Procedure(c) CLR Stored Procedure(d) System defined ProcedureThis question was posed to me in unit test.Query is from Built in Stored Procedures topic in division Developing with SQL Server of SQL Server |
|
Answer» The correct ANSWER is (d) SYSTEM defined PROCEDURE |
|
| 59. |
Point out the wrong statement.(a) A stored procedure is nothing more than prepared SQL code(b) We can create a Stored Procedure using the Create proc statement(c) We can create a Stored Procedure using the Create stor_proc statement(d) All of the mentionedThe question was posed to me in examination.Query is from Built in Stored Procedures in section Developing with SQL Server of SQL Server |
|
Answer» Correct ANSWER is (C) We can create a Stored PROCEDURE using the Create stor_proc statement |
|
| 60. |
Which of the following procedures are created by user for own actions?(a) User Defined Stored Procedure(b) Extended Procedure(c) CLR Stored Procedure(d) All of the mentionedI got this question during an interview for a job.This question is from Built in Stored Procedures topic in portion Developing with SQL Server of SQL Server |
|
Answer» Right OPTION is (a) User Defined Stored Procedure |
|
| 61. |
How many types of stored procedures are present in SQL Server?(a) 3(b) 4(c) 5(d) 8This question was addressed to me in class test.This intriguing question comes from Built in Stored Procedures in chapter Developing with SQL Server of SQL Server |
|
Answer» The CORRECT answer is (B) 4 |
|
| 62. |
Point out the wrong statement.(a) Stored procedure can accepts input and output parameters(b) Stored procedure can returns multiple values using input parameters(c) Using stored procedure, we can Select,Insert,Update,Delete data in database(d) None of the mentionedI got this question in a national level competition.My question comes from Built in Stored Procedures in portion Developing with SQL Server of SQL Server |
|
Answer» Right choice is (b) Stored PROCEDURE can returns multiple values using input PARAMETERS |
|
| 63. |
Stored procedure is a __________ set of one or more SQL statements.(a) interpreted(b) compiled(c) pre compiled(d) none of the mentionedI got this question during an online exam.My question comes from Built in Stored Procedures in division Developing with SQL Server of SQL Server |
|
Answer» The correct option is (C) PRE compiled |
|
| 64. |
Stored procedure used to remember the exact number of bytes is _____________(a) sp_datatype(b) sp_datatype_info(c) sp_info(d) none of the mentionedI have been asked this question in an international level competition.Question is taken from Stored Procedure in portion Developing with SQL Server of SQL Server |
|
Answer» The CORRECT CHOICE is (b) sp_datatype_info |
|
| 65. |
__________ is used to build the code dynamically and execute it.(a) sp_addmessage(b) sp_dropmessage(c) sp_altermessage(d) sp_executesqlThe question was asked in unit test.I need to ask this question from Stored Procedure topic in section Developing with SQL Server of SQL Server |
|
Answer» Right CHOICE is (d) sp_executesql |
|
| 66. |
Which of the following stored procedure is used for error messages?(a) sp_addmessage(b) sp_dropmessage(c) sp_altermessage(d) all of the mentionedI had been asked this question in an interview.Enquiry is from Stored Procedure topic in chapter Developing with SQL Server of SQL Server |
|
Answer» RIGHT OPTION is (a) sp_addmessage Explanation: Calling sp_addmessage is easy for RAISING errors. |
|
| 67. |
_____________ sets procedure options in SQL Server.(a) sp_procoption(b) sp_dropmessage(c) sp_altermessage(d) sp_executesqlI had been asked this question in class test.This key question is from Stored Procedure in division Developing with SQL Server of SQL Server |
|
Answer» Right CHOICE is (a) sp_procoption |
|
| 68. |
__________create the removable database.(a) sp_certify_removable(b) sp_certify(c) sp_removable(d) all of the mentionedI got this question in final exam.My query is from Stored Procedure in chapter Developing with SQL Server of SQL Server |
|
Answer» Right answer is (a) sp_certify_removable |
|
| 69. |
Point out the wrong statement.(a) Support for transactions is one of the most important reasons to use database engines such as SQL Server(b) BASE support(c) ACID support(d) All of the mentionedI got this question in final exam.I'm obligated to ask this question of Stored Procedure in chapter Developing with SQL Server of SQL Server |
|
Answer» CORRECT choice is (B) BASE support To EXPLAIN I would say: Stored PROCEDURES don’t have support for BASE. |
|
| 70. |
Which of the following has support for transaction?(a) sp_monitor(b) sp_bindsession(c) sp_status(d) all of the mentionedThis question was addressed to me in an interview for job.I'm obligated to ask this question of Stored Procedure in portion Developing with SQL Server of SQL Server |
|
Answer» The correct answer is (B) sp_bindsession |
|
| 71. |
__________ takes no parameters and returns all kinds of interesting information.(a) sp_monitor(b) sp_on(c) sp_status(d) none of the mentionedI have been asked this question in final exam.I'd like to ask this question from Stored Procedure topic in section Developing with SQL Server of SQL Server |
|
Answer» Correct choice is (a) sp_monitor |
|
| 72. |
Point out the correct statement.(a) Conditional logic applied to the results of the first SQL statements determines which subsequent SQL statements are executed(b) A stored procedure is a group of Transact-SQL statements pre compiled into a single execution plan(c) Stored procedures cannot improve performance(d) All of the mentionedI got this question in unit test.This interesting question is from Stored Procedure topic in portion Developing with SQL Server of SQL Server |
|
Answer» The correct answer is (a) Conditional logic applied to the RESULTS of the first SQL STATEMENTS determines which subsequent SQL statements are executed |
|
| 73. |
Reasons for consideration of the stored procedure can be?(a) With which tables will you have to work? Does it make sense to create a VIEW first?(b) How often will this procedure actually be used?(c) Do you want to view data in the database (SELECT), insert new records (INSERT INTO), or do I want to change an existing record (UPDATE)?(d) All of the mentionedI got this question in an internship interview.Question is taken from Stored Procedure in portion Developing with SQL Server of SQL Server |
|
Answer» RIGHT CHOICE is (d) All of the mentioned Easiest EXPLANATION: A STORED procedure is an already written SQL statement that is saved in the database. |
|
| 74. |
Nesting level of a stored procedure’s execution is stored in the _________ function.(a) NEST(b) NESTLEVEL(c) LEVEL(d) None of the mentionedI had been asked this question in homework.My doubt stems from Stored Procedure in chapter Developing with SQL Server of SQL Server |
|
Answer» Correct answer is (B) @@NESTLEVEL |
|
| 75. |
_____________ procedure cannot be created in Resource database.(a) System(b) User defined(c) Extended(d) All of the mentionedI had been asked this question in examination.Enquiry is from Stored Procedure in chapter Developing with SQL Server of SQL Server |
|
Answer» Correct CHOICE is (b) User DEFINED |
|
| 76. |
Nesting level of stored procedure is applicable for ____________(a) Triggers(b) Views(c) Functions(d) All of the mentionedThis question was addressed to me in quiz.This intriguing question originated from Stored Procedure topic in chapter Developing with SQL Server of SQL Server |
|
Answer» Right ANSWER is (d) All of the mentioned |
|
| 77. |
Which of the following is an extended procedure?(a) xp_change(b) sp_owner(c) sp_change(d) xp_logininfoI have been asked this question by my school teacher while I was bunking the class.Question is from Stored Procedure in section Developing with SQL Server of SQL Server |
|
Answer» CORRECT choice is (d) xp_logininfo For EXPLANATION: xp_logininfo procedure will display details about the BUILTIN\Administrators WINDOWS group. |
|
| 78. |
__________ provides details on any database object.(a) sp_changeowner(b) sp_owner(c) sp_change(d) none of the mentionedThis question was posed to me in an interview.My question is taken from Stored Procedure topic in section Developing with SQL Server of SQL Server |
|
Answer» CORRECT answer is (d) NONE of the mentioned Easy explanation: sp_help provides details on any DATABASE OBJECT such as tables,views and so on. |
|
| 79. |
Point out the wrong statement.(a) sp_depends provide the details of all database objects that depend on the specific database object(b) sp_helpdb provides the text of a stored procedure reside in Sql Server(c) Extended procedures provide an interface to external programs for various maintenance activities(d) All of the mentionedThis question was posed to me in final exam.This interesting question is from Stored Procedure topic in chapter Developing with SQL Server of SQL Server |
|
Answer» The CORRECT ANSWER is (b) sp_helpdb provides the text of a STORED procedure reside in SQL SERVER |
|
| 80. |
Which of the following is a system procedure?(a) sp_changeowner(b) sp_owner(c) sp_change(d) all of the mentionedThe question was asked in a national level competition.I need to ask this question from Stored Procedure topic in chapter Developing with SQL Server of SQL Server |
|
Answer» RIGHT option is (a) sp_changeowner The explanation is: sp_changeowner is used to CHANGE the OWNER of an database object. |
|
| 81. |
Data return using output parameter is ____________(a) Return codes, which are always an integer value(b) A global cursor that can be referenced outside the stored procedure(c) A single cursor that can be referenced inside the stored procedure(d) None of the mentionedThis question was addressed to me during an interview.Question is taken from Stored Procedure in section Developing with SQL Server of SQL Server |
|
Answer» Correct option is (d) None of the mentioned |
|
| 82. |
Point out the correct statement.(a) Stored procedures assist in achieving consistent implementation of logic across applications(b) A stored procedure is a group of Transact-SQL statements compiled into a single execution plan(c) Stored procedures can also improve performance(d) All of the mentionedThe question was posed to me during an interview.The above asked question is from Stored Procedure in division Developing with SQL Server of SQL Server |
|
Answer» Right choice is (d) All of the mentioned |
|
| 83. |
How many ways of returning data is present in SQL Server 2000?(a) 3(b) 4(c) 5(d) 6This question was addressed to me in a job interview.My question is from Stored Procedure in portion Developing with SQL Server of SQL Server |
|
Answer» The correct choice is (b) 4 |
|
| 84. |
ERROR_SEVERITY() returns the ________level of the error.(a) State number(b) Full text(c) Severity(d) None of the mentionedThis question was posed to me in quiz.This question is from Error Handling topic in division Developing with SQL Server of SQL Server |
|
Answer» CORRECT OPTION is (C) SEVERITY To explain: ERROR_SEVERITY() returns the severity level of the error. |
|
| 85. |
Which of the following is a global variable for error handling?(a) ERRORS(b) ERROR(c) ERR(d) None of the mentionedI had been asked this question by my college professor while I was bunking the class.Enquiry is from Error Handling in chapter Developing with SQL Server of SQL Server |
|
Answer» RIGHT option is (b) @@ERROR For EXPLANATION: @@ERROR is one of the basic error handling MECHANISMS in SQL Server. |
|
| 86. |
Which of the following is an Error function used within CATCH block?(a) ERROR_STATE()(b) ERROR_STATUS()(c) ERROR_MSG()(d) All of the mentionedThis question was addressed to me in an interview.Origin of the question is Error Handling topic in chapter Developing with SQL Server of SQL Server |
|
Answer» The CORRECT OPTION is (a) ERROR_STATE() |
|
| 87. |
Exception handling is possible in SQL Server using _____________(a) THROW(b) FINAL(c) FINALLY(d) All of the mentionedThis question was addressed to me in my homework.Asked question is from Error Handling topic in chapter Developing with SQL Server of SQL Server |
|
Answer» Right answer is (a) THROW |
|
| 88. |
Which of the following benefit does Exception handling with the TRY and CATCH blocks provide?(a) Exceptions provide a mechanism to signal errors directly rather than using some side effects(b) Exceptions can be seen by the programmer and checked during the compilation process(c) Exceptions provide a clean way to check for errors without cluttering code(d) All of the mentionedI have been asked this question in an online interview.I need to ask this question from Error Handling topic in division Developing with SQL Server of SQL Server |
|
Answer» Right choice is (d) All of the mentioned |
|
| 89. |
Point out the wrong statement.(a) If an error occurs in the TRY block, control is not passed to another group of statements that is enclosed in a CATCH block(b) If an error occurs in the TRY block, control is passed to another group of statements that is enclosed in a CATCH block(c) If an error does not occur in the TRY block, control is passed to another group of statements that is enclosed in a CATCH block(d) None of the mentionedThis question was posed to me in unit test.I want to ask this question from Error Handling topic in chapter Developing with SQL Server of SQL Server |
|
Answer» The correct OPTION is (b) If an error occurs in the TRY block, control is passed to ANOTHER group of STATEMENTS that is enclosed in a CATCH block |
|
| 90. |
Purpose of TRY…CATCH block in SQL Server is ___________(a) Error handling(b) Stored Procedure handling(c) Message handling(d) None of the mentionedI have been asked this question in a job interview.This key question is from Error Handling in portion Developing with SQL Server of SQL Server |
|
Answer» Right answer is (a) Error handling |
|
| 91. |
Point out the correct statement.(a) While executing some DML Statement like INSERT, DELETE, UPDATE we can handle the error for checking proper output(b) If transaction fails, then we need to commit – This can be done by error handling(c) If transaction succeeds, then we need to rollback – This can be done by error handling(d) None of the mentionedI got this question in an online interview.I'd like to ask this question from Error Handling in division Developing with SQL Server of SQL Server |
|
Answer» The correct choice is (a) While EXECUTING some DML Statement like INSERT, DELETE, UPDATE we can handle the error for checking PROPER output |
|
| 92. |
Which of the following statements can be checked for Errors?(a) CREATE(b) DROP(c) DELETE(d) INSERTThis question was addressed to me by my school teacher while I was bunking the class.I need to ask this question from Error Handling topic in division Developing with SQL Server of SQL Server |
|
Answer» Correct OPTION is (d) INSERT |
|
| 93. |
SQL Server static cursors are always ___________(a) Read-only(b) Write-only(c) Read, Write(d) None of the mentionedThis question was addressed to me during a job interview.The doubt is from Cursor in chapter Developing with SQL Server of SQL Server |
|
Answer» The CORRECT option is (a) Read-only |
|
| 94. |
Which of the following blocks are used for error handling in SQL Server?(a) TRY…CATCH(b) TRY…FINAL(c) TRY…END(d) CATCH…TRYI had been asked this question in an online quiz.I'm obligated to ask this question of Error Handling topic in portion Developing with SQL Server of SQL Server |
|
Answer» RIGHT answer is (a) TRY…CATCH Explanation: SQL Server 2005 introduced TRY…CATCH statement which helps US to handle the ERRORS effectively in the BACK end. |
|
| 95. |
Which of the following FORWARD ONLY Cursor is populated at the time of creation?(a) KEYSET(b) FORWARD_ONLY STATIC(c) FAST_FORWARD(d) All of the mentionedI had been asked this question in semester exam.I'm obligated to ask this question of Cursor in section Developing with SQL Server of SQL Server |
|
Answer» Correct answer is (B) FORWARD_ONLY STATIC |
|
| 96. |
____________ cursor is sensitive to any changes to the data source.(a) Static Cursors(b) Dynamic Cursors(c) Keyset Driven Cursors(d) None of the mentionedThe question was asked during an online interview.My question is based upon Cursor topic in division Developing with SQL Server of SQL Server |
|
Answer» Right choice is (c) Keyset DRIVEN Cursors |
|
| 97. |
Which of the cursors further have their subtypes?(a) Static Cursors(b) Dynamic Cursors(c) Keyset Driven Cursors(d) None of the mentionedI have been asked this question during an online interview.I'm obligated to ask this question of Cursor topic in portion Developing with SQL Server of SQL Server |
|
Answer» Correct ANSWER is (d) None of the mentioned |
|
| 98. |
A dynamic cursor in SQL Server allows you to see __________ data.(a) Updated(b) Inserted(c) Deleted(d) All of the mentionedI got this question during an interview for a job.I need to ask this question from Cursor in portion Developing with SQL Server of SQL Server |
|
Answer» The CORRECT choice is (d) All of the mentioned |
|
| 99. |
Point out the wrong statement.(a) We should use cursor in all cases(b) A static cursor can move forward and backward direction(c) A forward only cursor is the fastest cursor(d) All of the mentionedI have been asked this question during an internship interview.I would like to ask this question from Cursor topic in portion Developing with SQL Server of SQL Server |
|
Answer» Correct option is (a) We should use CURSOR in all cases |
|
| 100. |
Various alternatives to cursor in SQL Server are ___________(a) FOR(b) IF..ELSE(c) WHILE(d) All of the mentionedI had been asked this question in a national level competition.Question is from Cursor in portion Developing with SQL Server of SQL Server |
|
Answer» CORRECT answer is (c) WHILE The best explanation: CURSOR ALTERNATIVES are WHILE loop, SUBQUERIES, Temporary TABLES and Table variables. |
|