Microsoft SQL Server Database Quiz Questions

Chapter Name:Chapter 8 - RDBMS Concepts
Lesson Content Link:Primary Key
Current Quiz Count:45
Progress
0%
Q1
True / False

A primary key in a table ensures unique and non-null values for the column.

Q2
True / False

A table can have multiple primary keys.

Q3
True / False

A primary key column cannot contain NULL values.

Q4
True / False

The primary key constraint can be applied to more than one column in a table.

Q5
True / False

A primary key can be defined on a table after the table has been created.

Q6
True / False

The primary key values can be duplicated across rows in a table.

Q7
True / False

A primary key in a relational database table uniquely identifies each row.

Q8
True / False

A foreign key is the same as a primary key in a database table.

Q9
True / False

You cannot define a primary key in a table if it already has a foreign key.

Q10
True / False

A primary key column can contain duplicate values if it is part of a composite key.

Q11
True / False

Primary keys must be numeric fields.

Q12
True / False

A table can have a primary key without a unique constraint.

Q13
True / False

The values of a primary key can be changed after they are set.

Q14
True / False

A primary key and a unique key are identical in function.

Q15
True / False

In SQL Server, a primary key is automatically indexed.

Q16
Single Choice

Which of the following statements is true about a primary key in a SQL Server table?

Q17
Single Choice

How many primary keys can a single table have in SQL Server?

Q18
Single Choice

Which of the following best describes a composite primary key?

Q19
Single Choice

What is the main purpose of a primary key in a database table?

Q20
Single Choice

What constraint is automatically created when a primary key is defined in SQL Server?

Q21
Single Choice

Which data type is suitable for a primary key?

Q22
Single Choice

Can a primary key be modified after it has been set?

Q23
Single Choice

Which of the following statements about a primary key is incorrect?

Q24
Single Choice

What is one of the main characteristics of a primary key?

Q25
Single Choice

What happens if a primary key column is set to NULL in SQL Server?

Q26
Single Choice

Can a foreign key reference a composite primary key?

Q27
Single Choice

What is the maximum number of columns that can be included in a composite primary key in SQL Server?

Q28
Single Choice

Which SQL statement is used to add a primary key to an existing table?

Q29
Single Choice

Which clause is used to define a primary key when creating a new table?

Q30
Single Choice

What does SQL Server automatically create to enforce a primary key constraint?

Q31
Single Choice

Which statement best describes a primary key?

Q32
Multiple Choice

Which of the following is a valid reason to use a composite primary key?

Q33
Multiple Choice

What is the primary purpose of a primary key?

Q34
Multiple Choice

Which of the following are true about primary keys?

Q35
Multiple Choice

Which SQL clause is used to enforce a primary key on multiple columns?

Q36
Multiple Choice

How does a composite primary key enhance data integrity?

Q37
Multiple Choice

Which of the following are benefits of defining a primary key?

Q38
Multiple Choice

Which of the following is not a characteristic of a primary key?

Q39
Multiple Choice

Which statements are true about primary keys and foreign keys?

Q40
Multiple Choice

Which columns can be part of a composite primary key?

Q41
Multiple Choice

What SQL clause is used to enforce a primary key constraint on a column?

Q42
Multiple Choice

Why might you use a composite primary key in a database design?

Q43
Multiple Choice

Which of the following describes a composite primary key?

Q44
Multiple Choice

What is the purpose of defining a primary key on a table?

Q45
Multiple Choice

Which of the following is true about primary keys in SQL Server?