This set of SQL Server Multiple Choice Questions & Answers (MCQs) focuses on “Data Definition Language – 1”.
1. What options did ALTER DATABASE statement add?
a) DATABASE SNAPSHOT syntax
b) ATTACH_REBUILD_LOG clause
c) DB_CHAINING option
d) READ_COMMITTED_SNAPSHOT
View Answer
Explanation: ALTER DATABASE is used for instant file initialization when adding or growing data files.
2. Which of the following item is provided by CREATE DATABASE statement?
a) Service Broker options
b) ALLOW_SNAPSHOT_ISOLATION
c) DB_CHAINING
d) Database mirroring
View Answer
Explanation: CREATE DATABASE is used mainly for creating new database.
3. Which of the following statement removes database including its related components?
a) DROP DATABASE
b) DELETE DATABASE
c) REMOVE DATABASE
d) None of the mentioned
View Answer
Explanation: DROP statement adds support for dropping database snapshots.
4. Which of the following database cannot be dropped?
a) TEMPDB
b) Master
c) MSDB
d) All of the mentioned
View Answer
Explanation: System databases cannot be dropped.
5. Point out the correct statement.
a) When a database is dropped, the master database should be backed up
b) You can drop a database currently being used
c) Dropping a database snapshot does not delete the database snapshot from an instance of SQL Server
d) None of the mentioned
View Answer
Explanation: Master database records all of the system level information for a SQL Server.
6. Which is the minimal permission that a user must have to drop the database?
a) READ
b) WRITE
c) VIEW
d) CONTROL
View Answer
Explanation: To execute DROP DATABASE, at a minimum, a user must have CONTROL permission on the database.
7. Which of the following statement removes sales and suppliers database?
a) DROP DATABASE Sales, NewSales
b) DROP DATABASE Sales, suppliers
c) DROP DATABASE Sales and suppliers
d) DROP DATABASE Sales-suppliers
View Answer
Explanation: DROP DATABASE can be used for removing multiple databases in one statement.
8. Which of the following statement is used to create database snapshot?
a) CREATE DATABASE
b) CREATE SNAPSHOT
c) CREATE SNAPDB
d) None of the mentioned
View Answer
Explanation: CREATE DATABASE statement creates a new database and the files used to store the database, creates a database snapshot, or attaches a database from the detached files of a previously created database.
9. Syntax for dropping a database snapshot named “Sushant” would be ____________
a) DROP DATABASE Sushant
b) DROP DATABASE SNAP Sushant
c) DROP SNAPSHOT Sushant
d) None of the mentioned
View Answer
Explanation: DROP command removes database snapshot without affecting the source database.
10. View used used for displaying current status of database is ___________
a) system.databases
b) current.databases
c) sys.databases
d) status.databases
View Answer
Explanation: sys.databases catalog view is used for displaying the present status of the system.
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]- Apply for Programming Internship
- Check Information Technology Books
- Check SQL Server Books
- Practice Programming MCQs