RSS Feed

Multiple Choice Questions on SQL Keys

Multiple Choice Questions on SQL Keys

1) Which of the following is not a Key in SQL Server?

a) Primary
b) Foreign
c) Alternate
d) Secondary

2) Can a column with Primary Key have Null value?

a) True
b) False

3) How can a SQL developer add a key on a table?

a) While creating a table
b) With Alter table command
c) With SQL server Properties window (by right clicking on a table)
d) All of the above
e) None of the above

4) Can a key created on a table be Dropped?

a) True
b) False

5) A Key which is a set of one or more columns that can identify a record uniquely is called?

a) Natural key
b) Candidate key
c) Not Null key
d) Alternate key

6) What is true about Unique and primary key?

a) Unique can have multiple NULL values but Primary can’t have.
b) Unique can have single NULL value but Primary can’t have even single.
c) Both can have duplicate values
d) None of the above

7) Can a table have more than one foreign key?

a) True
b) False

8) By default, which key creates Clustered index?

a) Foreign Key
b) Unique Key
c) Primary Key
d) None of the above

9) Which key accepts multiple NULL values?

a) Foreign Key
b) Unique Key
c) Primary Key
d) None of the above

10) Can column with Unique key have duplicate values?

a) True
b) False

Answers