SQL Server Database MCQs

SQL Server Database MCQs

Our team has conducted extensive research to compile a set of SQL Server Database MCQs. We encourage you to test your SQL Server Database knowledge by answering these multiple-choice questions provided below.
Simply scroll down to begin!

1: A filtered index is an optimized non-clustered index.

A.   True

B.   False

2: CPUs can dynamically be added to a running system, by using __________ feature.

A.   Hot Add CPU

B.   Dynamic add CPU

C.   Passive add CPU

D.   Cold Add CPU

3: Default is a type of constraint although it does not really enforce anything.

A.   True

B.   False

4: Which type of integrity preserves the defined relationship between tables when records are entered or deleted?

A.   Referential integrity

B.   User-defined integrity

C.   Domain integrity

D.   Entity integrity

5: Which of the following fixed database roles can add or remove user IDs?

A.   Db_securityadmin

B.   Db_sysadmin

C.   Db_accessadmin

D.   Db_setupadmin

6: Which of the following statements is/are false for Declarative Management Framework (DMF) in sql server 2008?

A.   A policy can be designed for allowing the usage of unauthorized applications.

B.   SQL Server does not enforce to define the policies by using Management Studio.

C.   SQL Server does not enforce to define the policies by using Management Studio and a policy can be designed for allowing the usage of unauthorized applications.

D.   System for managing the instances of SQL Server 2008.

7: Which of the following prevent "Dirty Reads"?

A.   READ UNCOMMITTED

B.   SERIALIZABLE

C.   REPEATABLE READ

D.   Read commited

8: Which statement is used to delete all rows in a table without having the action logged?

A.   Drop table statement

B.   Truncate table statement

C.   Delete table statement

D.   None

9: Difference between UNION and UNION ALL:

A.   UNION returns only unique records from both tables. UNION ALL returns all records from both tables.

B.   UNION ALL is no longer supported in sql server 2000 onward.

C.   Both are similar

10: Which of the following DBCC command is used to see when was the last time the index rebuild?

A.   DBCC SHOWCONFIG

B.   DBCC SHOW_STATISTICS

C.   DBCC DBREINDEX

11: What is the default "SORT" order for a SQL?

A.   Descending

B.   Ascending

12: Which of the following statements is/are false for Extended events in sql server 2008?

A.   An architecture that is not very scalable, highly configurable.

B.   None

C.   Used for problem identification or problem trouble shooting.

D.   Enhanced event handling system in SQL Server.

13: By default sql server has ___________ isolation level.

A.   SERIALIZABLE

B.   READ COMMITTED

C.   REPEATABLE READ

D.   READ UNCOMMITTED

14: Which join combines all rows from both tables?

A.   Left Outer Join

B.   Right Outer Join

C.   Inner Join

D.   Cross Join

15: By default "FILLFACTOR" value is __________.

A.   One

B.   Zero

C.   Five

D.   Two

16: Which of the following statements is/are false for Plan freezing?

A.   Helps to monitor schemas

B.   Allows the DBAs to persist plan guides which helps when a query fails

C.   None

D.   Monitoring features for checking when the query is succeeded or failed

17: SQL Server 2000 always returns the result of a FOR XML query directly to the client in XML form.

A.   False

B.   True

18: Which of the following statements is/are true for Plan freezing?

A.   IntelliSense of SQL Server 2008 is ON by default

B.   DML statements can also be used with IntelliSense

C.   IntelliSense of SQL Server 2008 is OFF by default

D.   IntelliSense of SQL Server 2008 is ON by default and DML statements can also be used with IntelliSense

19: __________ is a feature that is used for tracking the changes on a table.

A.   Change Data Capture

B.   Change table Capture

C.   Change database Capture

D.   Change schema Capture

20: ________ is a set of commands used to control a database, which includes security.

A.   DML

B.   DDL

C.   DCL

D.   DPL

21: ________ is a set of commands used to update and query a database.

A.   DML

B.   DDL

C.   DCL

D.   DPL

22: A ________ is an in-memory copy of data read from database tables.

A.   Data control

B.   Dataset

C.   Connection

D.   Data adapter

23: An example of a command you would use when making changes to a product table is ____.

A.   SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE, FROM PRODUCT, WHERE V_CODE <> 21344;

B.   DELETE FROM PRODUCT, WHERE P_CODE = 'BRT-345';,

C.   UPDATE PRODUCT, SET P_INDATE = '18-JAN-2004', WHERE P_CODE = '13-Q2/P2';

D.   SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE, FROM PRODUCT, WHERE V_CODE = 21344

24: Any create command may be reversed by using a(n) ________ command.

A.   Undo

B.   Drop

C.   Delete

D.   Unpack

25: The sql character data format(s) is(are) ____.

A.   CHAR and VARCHAR2.

B.   VARCHAR2 only.

C.   Alphanumeric.

D.   CHAR only

26: The sql command that allows a user to list the contents of a table is _____.

A.   INSERT

B.   SELECT

C.   COMMIT

D.   UPDATE

27: The sql command that lets you insert rows into a table is ____.

A.   INSERT

B.   SELECT

C.   COMMIT

D.   UPDATE

28: The sql command that lets you select attributes from rows in one or more tables is ____.

A.   INSERT

B.   SELECT

C.   COMMIT

D.   UPDATE

29: The ____ is responsible for ensuring database security and integrity.

A.   Database programmer

B.   Systems analyst

C.   Database security officer

D.   Data administrator

30: The privilege ____ can be granted to change the table structure.

A.   WRITE

B.   UPDATE

C.   ALTER

D.   MODIFY

31: In sql, table names cannot exceed ____ characters.

A.   50

B.   30

C.   40

D.   60

32: A ____ procedure returns a single value to the calling procedure.

A.   Function

B.   Event handling

C.   Property

D.   Operator

33: When a script file contains more than one command, each command must end with a(n) ____.

A.   Question mark.

B.   Colon.

C.   Period.

D.   Semicolon

34: The ____ data type is used to store integers.

A.   DISTINCT

B.   DROP

C.   INT

D.   INSERT

35: The ____ command is permanent.

A.   SELECT

B.   ​COMMIT

C.   SAVE

D.   ​UPDATE

36: The ____ data type stores only the actual character string.

A.   CHAR

B.   VARCHAR

C.   TEXT

D.   From

37: The ____ function is used to create a constant.

A.   Define()

B.   Min()

C.   Abs()

D.   Sqrt()

38: Only one ____ constraint can exist for each table.

A.   PRIMARY KEY

B.   FOREIGN KEY

C.   ​ USER_CONSTRAINTS

D.   CONSTRAINT

39: In sql server, you can use the ____ function to obtain today?s date.

A.   SYSDATE

B.   GETDATE()​

C.   TODAYS_DATE

D.   CURRENTDATE().

40: A subquery must include a(n) ____ clause.

A.   SELECT

B.   WHERE

C.   FROM

D.   Both a and b

41: A subquery is a/an ______________ statement thats coded within another sql statement.

A.   Join

B.   Expansion

C.   Fork

D.   SELECT

42: A subquery can be coded in a where, from, select, or ______________ clause.

A.   Join

B.   Expansion

C.   Fork

D.   Select