SQL Server Questions and Answers – Data Definition Language – 3

This set of SQL Server Multiple Choice Questions & Answers (MCQs) focuses on “Data Definition Language – 3”.

1. Point out the wrong statement with respect to ALTER INDEX statement.
a) Adds new format for specifying index and table names
b) Adds the index option:MAXDOP
c) Adds the index option:ONLINE
d) None of the mentioned
View Answer

Answer: d
Explanation: Options provided are features of DROP index and CREATE index statements.

2. Which of the following adds MOVE TO clause?
a) DROP INDEX
b) ALTER INDEX
c) UPDATE INDEX
d) CREATE INDEX
View Answer

Answer: a
Explanation: DROP INDEX statement enables moving data from a clustered index to another filegroup or partition scheme.

3. Which is a new DDL statement?
a) DROP ROLES
b) CREATE APPLICATION ROLE
c) CREATE USERS
d) None of the mentioned
View Answer

Answer: b
Explanation: Application role creation changes the properties of an application role.
advertisement
advertisement

4. Which of the following creates a new Microsoft Windows or SQL Server login account?
a) CREATE LOGIN
b) DROP LOGIN
c) UPDATE LOGIN
d) REMOVE LOGIN
View Answer

Answer: a
Explanation: CREATE login generates a new SQL Server login.

5. Statement used to remove a user from the current database is ____________
a) DROP ROLE
b) DROP USER
c) DROP LOGIN
d) None of the mentioned
View Answer

Answer: b
Explanation: DROP USER is used to delete the user account from the database.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. Command used to modify the schema is __________
a) ALTER SCHEMA
b) ALTER STRUCTURE
c) ALTER VIEW
d) DBCC SHRINKDB
View Answer

Answer: a
Explanation: ALTER SCHEMA changes the owner of a schema.

7. Creation of new database role in the current database is made by __________
a) CREATE APPLICATION ROLE
b) CREATE ROLE
c) CREATE USER
d) CREATE LOGIN
View Answer

Answer: b
Explanation: CREATE ROLE generates a new role in the database.
advertisement

8. Purpose of ALTER CERTIFICATE is __________
a) Adds a private key to a certificate
b) Changes the public key of a certificate
c) Removes the certificate from the database
d) None of the mentioned
View Answer

Answer: a
Explanation: ALTER CERTIFICATE changes the private key used to encrypt a certificate.

9. DDL statements not used for Synonym is __________
a) CREATE SYNONYM
b) DROP SYNONYM
c) ALTER SYNONYM
d) None of the mentioned
View Answer

Answer: c
Explanation: Synonyms allow client applications to use the single-part name of a synonym to reference a base object.
advertisement

10. Which of the following statement drops the synonym?
a) DELETE SYNONYM
b) DROP SYNONYM
c) REMOVE SYNONYM
d) None of the mentioned
View Answer

Answer: d
Explanation: DROP SYNONYM deletes an existing synonym.

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.