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.
| 101. |
How many type of cursor is present in SQL Server?(a) 3(b) 4(c) 5(d) 6This question was posed to me in an interview.I want to ask this question from Cursor topic in chapter Developing with SQL Server of SQL Server |
|
Answer» Right answer is (B) 4 |
|
| 102. |
Point out the correct statement.(a) A Cursor is opened and populated by executing the SQL statement defined by the cursor(b) After data manipulation, we should close the cursor explicitly(c) A cursor is declared by defining the SQL statement that returns a result set(d) All of the mentionedI have been asked this question in final exam.I would like to ask this question from Cursor in division Developing with SQL Server of SQL Server |
|
Answer» RIGHT CHOICE is (d) All of the mentioned Explanation: We use cursor when we NEED to update records in a database table in singleton FASHION means ROW by row. |
|
| 103. |
Life cycle of typical cursor involves ______ steps in SQL Server.(a) 2(b) 3(c) 4(d) 5This question was posed to me by my school principal while I was bunking the class.This interesting question is from Cursor topic in portion Developing with SQL Server of SQL Server |
|
Answer» RIGHT answer is (d) 5 Easy explanation: The five STEPS are Declare CURSOR,Open,FETCH,CLOSE and Deallocate. |
|
| 104. |
LANGUAGE variable whose return type nvarchar is specified in _____________(a) sys.name(b) syslang.name(c) syslanguages.name(d) syslanguages.idThe question was posed to me in an interview.The origin of the question is Variables in portion Developing with SQL Server of SQL Server |
|
Answer» Right ANSWER is (c) syslanguages.NAME |
|
| 105. |
Which of the following is a global variable?(a) CPU_BUSY(b) CPU_IO(c) CPU(d) I_BUSYI got this question during an interview.Question is taken from Variables topic in section Developing with SQL Server of SQL Server |
|
Answer» Correct choice is (a) @@CPU_BUSY |
|
| 106. |
Which of the following keyword is not associated with initialization of variable?(a) DECLARE(b) SET(c) SELECT(d) All of the mentionedI have been asked this question during an online interview.I need to ask this question from Variables in chapter Developing with SQL Server of SQL Server |
|
Answer» Correct choice is (d) All of the mentioned |
|
| 107. |
Point out the wrong statement.(a) All the global variables represent information specific to the server or a current user session(b) SQL Server provides only three global variables(c) Global variables represent a special type of variable(d) None of the mentionedThe question was posed to me during an interview.I would like to ask this question from Variables in division Developing with SQL Server of SQL Server |
|
Answer» The CORRECT choice is (B) SQL Server provides only three global variables |
|
| 108. |
Variables was added newly to SQL Server version _____________(a) 2005(b) 2008(c) 2012(d) 2014I have been asked this question during an online interview.The doubt is from Variables topic in chapter Developing with SQL Server of SQL Server |
|
Answer» The correct choice is (B) 2008 |
|
| 109. |
Which of the following components constitutes use CASE expression?(a) The primary key name to transform(b) The BEGIN keyword(c) The CASE keyword(d) Where clause defining an alias for the CASE expressionI have been asked this question in a job interview.My question comes from Procedural Flow topic in division Developing with SQL Server of SQL Server |
|
Answer» RIGHT choice is (c) The CASE keyword Explanation: A common use of the CASE expression is to REPLACE CODES or ABBREVIATIONS with more readable values. |
|
| 110. |
The BEGIN and END statements are used when ____________(a) A WHILE loop needs to include a block of statements(b) An element of a CASE expression needs to include a block of statements(c) An IF or ELSE clause needs to include a block of statements(d) All of the mentionedThe question was posed to me in an interview.Question is from Procedural Flow in division Developing with SQL Server of SQL Server |
|
Answer» CORRECT answer is (d) All of the mentioned The explanation is: A BEGIN and END statement block MUST CONTAIN at least one Transact-SQL statement. |
|
| 111. |
Which of the following scenario makes use of BEGIN..END keyword redundant?(a) when an IF statement controls the execution of multiple Transact-SQL statement(b) when an IF statement controls the execution of only one Transact-SQL statement(c) when an IF statement controls the execution of one or more Transact-SQL statement(d) none of the mentionedThis question was addressed to me in quiz.Enquiry is from Procedural Flow topic in division Developing with SQL Server of SQL Server |
|
Answer» The correct ANSWER is (b) when an IF statement CONTROLS the execution of only ONE Transact-SQL statement |
|
| 112. |
Which of the following two Transact-SQL statements are commonly used with WHILE?(a) BREAK and CONTINUE(b) BREAK and IF(c) IF and ELSE(d) All of the mentionedThis question was addressed to me in homework.Question is taken from Procedural Flow topic in section Developing with SQL Server of SQL Server |
|
Answer» CORRECT option is (a) BREAK and CONTINUE Easiest explanation: The BREAK STATEMENT exits the INNERMOST WHILE LOOP and the CONTINUE statement restarts a WHILE loop. |
|
| 113. |
Point out the wrong statement.(a) GOTO can exist within conditional control-of-flow statements, statement blocks, or procedures(b) GOTO permissions need not be granted to any user(c) GOTO statements can be nested(d) None of the mentionedThe question was posed to me in my homework.This key question is from Procedural Flow in section Developing with SQL Server of SQL Server |
|
Answer» The CORRECT option is (b) GOTO PERMISSIONS need not be granted to any user |
|
| 114. |
Which of the following statement decrypts a symmetric key?(a) OPEN SYMMETRIC KEY(b) DECRYPT SYMMETRIC KEY(c) CLOSE SYMMETRIC KEY(d) None of the mentionedI have been asked this question during an interview.I'm obligated to ask this question of Transact SQL in section Developing with SQL Server of SQL Server |
|
Answer» Right ANSWER is (a) OPEN SYMMETRIC KEY |
|
| 115. |
Purpose of CLOSE MASTER KEY is _______________(a) Deletes the master key of the current database(b) Closes the private key of the current database(c) Closes the public key of the current database(d) None of the mentionedThis question was posed to me by my school principal while I was bunking the class.I'm obligated to ask this question of Transact SQL topic in division Developing with SQL Server of SQL Server |
|
Answer» Right CHOICE is (a) Deletes the master key of the current database |
|
| 116. |
Which of the following language is used for procedural flow in SQL Server?(a) Flow language(b) Control language(c) Control-of-flow language(d) None of the mentionedI got this question by my college director while I was bunking the class.I would like to ask this question from Procedural Flow topic in division Developing with SQL Server of SQL Server |
|
Answer» The correct answer is (c) Control-of-FLOW LANGUAGE |
|
| 117. |
Which of the following is- a security statement?(a) ADD SIGNATURE(b) EXECUTE AS(c) SETUSER(d) All of the mentionedThe question was asked in class test.My enquiry is from Transact SQL topic in chapter Developing with SQL Server of SQL Server |
|
Answer» Right OPTION is (d) All of the mentioned |
|
| 118. |
Which of the following Statement ends one side of an existing conversation?(a) BEGIN CONVERSATION TIMER(b) END CONVERSATION TIMER(c) END CONVERSATION(d) GET CONVERSATION GROUPThe question was posed to me in an interview.Query is from Transact SQL topic in division Developing with SQL Server of SQL Server |
|
Answer» The CORRECT choice is (b) END CONVERSATION TIMER |
|
| 119. |
Point out the correct statement.(a) T-SQL is SQL language for SYBASE(b) GET_TRANSMISSION_STATUS does provide information for messages that do not have a conversation endpoint in the current instance(c) CREATE USER transfers a securable between schemas(d) CREATE LOGIN modifies the login detailsThis question was posed to me during an interview.My query is from Transact SQL topic in section Developing with SQL Server of SQL Server |
|
Answer» The correct choice is (a) T-SQL is SQL LANGUAGE for SYBASE |
|
| 120. |
RECEIVE service broker statement applies to which of the versions?(a) 2000(b) 2005(c) 2008(d) All of the mentionedI got this question during an interview.My question is based upon Transact SQL in division Developing with SQL Server of SQL Server |
|
Answer» Correct choice is (c) 2008 |
|
| 121. |
Purpose of GET_TRANSMISSION_STATUS is _____________(a) Returns the status for the first transmission for end side of a conversation(b) Returns the status for the first transmission for one side of a conversation(c) Returns the status for the last transmission for end side of a conversation(d) Returns the status for the last transmission for one side of a conversationThe question was asked in examination.The doubt is from Transact SQL in portion Developing with SQL Server of SQL Server |
|
Answer» The correct option is (d) Returns the STATUS for the last transmission for ONE side of a conversation |
|
| 122. |
Which of the following is not a SERVICE BROKER statement?(a) BEGIN CONVERSATION TIMER(b) END CONVERSATION(c) CREATE USERS(d) None of the mentionedThe question was posed to me in an interview for internship.The question is from Transact SQL in chapter Developing with SQL Server of SQL Server |
|
Answer» Right OPTION is (c) CREATE USERS |
|
| 123. |
Applications that can generate Transact-SQL can be ____________(a) General office productivity applications(b) Applications that use a graphical user interface (GUI) to let users select the tables and columns from which they want to see data(c) Applications that use general language sentences to determine what data a user wants to see(d) All of the mentionedI had been asked this question in homework.My question is based upon Transact SQL in chapter Developing with SQL Server of SQL Server |
|
Answer» The correct option is (d) All of the mentioned |
|
| 124. |
Which of the following is a proprietary extension of SQL for Microsoft SQL Server?(a) PL-SQL(b) T-SQL(c) PG-SQL(d) P-SQLThe question was asked in an international level competition.This interesting question is from Transact SQL topic in chapter Developing with SQL Server of SQL Server |
|
Answer» The CORRECT answer is (b) T-SQL |
|