SQL Server Questions and Answers – Transact SQL

This set of SQL Server Multiple Choice Questions & Answers (MCQs) focuses on “Transact SQL”.

1. 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-SQL
View Answer

Answer: b
Explanation: Transact-SQL (T-SQL) is Microsoft’s and Sybase’s proprietary extension to SQL.

2. 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 mentioned
View Answer

Answer: d
Explanation: Transact-SQL is central to using SQL Server. All applications that communicate with an instance of SQL Server do so by sending Transact-SQL statements to the server, regardless of the user interface of the application.

3. Which of the following is not a SERVICE BROKER statement?
a) BEGIN CONVERSATION TIMER
b) END CONVERSATION
c) CREATE USERS
d) None of the mentioned
View Answer

Answer: c
Explanation: SQL Server Service Broker provides native support for messaging and queuing applications in the SQL Server Database Engine.
advertisement
advertisement

4. RECEIVE service broker statement applies to which of the versions?
a) 2000
b) 2005
c) 2008
d) All of the mentioned
View Answer

Answer: c
Explanation: RECEIVE retrieves one or more messages from a queue. Depending on the retention setting for the queue, either remove the message from the queue or updates the status of the message in the queue.

5. 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 GROUP
View Answer

Answer: b
Explanation: Service broker is designed for dialogs, not monolog conversations.

6. 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 conversation
View Answer

Answer: d
Explanation: GET_TRANSMISSION_STATUS returns a string describing the status of the last transmission attempt for the specified conversation.

7. 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 details
View Answer

Answer: a
Explanation: Prior to version 7.0 the code base for MS SQL Server was sold by Sybase SQL. Microsoft SQL and Sybase both support T-SQL statements.
advertisement

8. Which of the following is- a security statement?
a) ADD SIGNATURE
b) EXECUTE AS
c) SETUSER
d) All of the mentioned
View Answer

Answer: d
Explanation: SQL Server provides many security statements for a secure database.

9. 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 mentioned
View Answer

Answer: a
Explanation: CLOSE MASTER KEY statement closes the master key of the current database.
advertisement

10. 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 mentioned
View Answer

Answer: a
Explanation: OPEN SYMMETRIC KEY decrypts a symmetric key and makes it available for use.

Sanfoundry Global Education & Learning Series – SQL Server.

To practice all areas of SQL Server, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.