Microsoft SQL Server Database Quiz Questions

Chapter Name:Chapter 5 - DDL (Data Definition Language)
Lesson Content Link:UNIQUE Constraint
Current Quiz Count:45
Progress
0%
Q1
True / False

A UNIQUE constraint ensures that all values in a column are unique.

Q2
True / False

A table can have only one UNIQUE constraint.

Q3
True / False

NULL values are allowed in a column with a UNIQUE constraint.

Q4
True / False

UNIQUE constraints can be applied to multiple columns to enforce uniqueness across the combination of values.

Q5
True / False

UNIQUE constraints automatically create a unique index on the specified column.

Q6
True / False

A UNIQUE constraint and a PRIMARY KEY constraint can be applied to the same column.

Q7
True / False

You can drop a UNIQUE constraint using the ALTER TABLE statement.

Q8
True / False

UNIQUE constraints can be applied to both character and numeric columns.

Q9
True / False

UNIQUE constraints enforce the uniqueness of values during both INSERT and UPDATE operations.

Q10
True / False

UNIQUE constraints can be applied to columns that allow NULL values.

Q11
True / False

A UNIQUE constraint can be created at the time of table creation or after the table has been created.

Q12
True / False

The UNIQUE constraint can be defined only on a single column in a table.

Q13
True / False

UNIQUE constraints are a type of integrity constraint.

Q14
True / False

You cannot disable a UNIQUE constraint temporarily.

Q15
True / False

UNIQUE constraints can be enforced at the column level only.

Q16
Single Choice

What is the main purpose of a UNIQUE constraint in SQL Server?

Q17
Single Choice

Which of the following statements about UNIQUE constraints is true?

Q18
Single Choice

How does a UNIQUE constraint differ from a PRIMARY KEY constraint?

Q19
Single Choice

Can a column have both a UNIQUE constraint and a FOREIGN KEY constraint?

Q20
Single Choice

What happens if you try to insert a duplicate value into a column with a UNIQUE constraint?

Q21
Single Choice

Can a UNIQUE constraint be defined on a computed column?

Q22
Single Choice

What is the default behavior of a UNIQUE constraint regarding NULL values?

Q23
Single Choice

Which SQL statement is used to add a UNIQUE constraint to an existing column?

Q24
Single Choice

Can a UNIQUE constraint be defined on a table with no primary key?

Q25
Single Choice

Which of the following is a characteristic of a UNIQUE constraint?

Q26
Single Choice

How can a UNIQUE constraint be removed from a column?

Q27
Single Choice

Can UNIQUE constraints be enforced on the combination of two or more columns?

Q28
Single Choice

What is the result of applying a UNIQUE constraint to a column that already contains duplicate values?

Q29
Single Choice

Which constraint ensures that all values in a column or a set of columns are unique?

Q30
Single Choice

How many NULL values are allowed in a column with a UNIQUE constraint?

Q31
Multiple Choice

Which of the following are characteristics of a UNIQUE constraint?

Q32
Multiple Choice

Which SQL statement can be used to add a UNIQUE constraint?

Q33
Multiple Choice

What actions can be taken to remove a UNIQUE constraint?

Q34
Multiple Choice

Which of the following statements are true about composite unique keys?

Q35
Multiple Choice

Which of the following are limitations of UNIQUE constraints?

Q36
Multiple Choice

Which of the following statements are correct about UNIQUE constraints and NULL values?

Q37
Multiple Choice

Which of the following scenarios would cause a UNIQUE constraint violation?

Q38
Multiple Choice

Which of the following can be used to enforce data integrity?

Q39
Multiple Choice

What are the advantages of using UNIQUE constraints?

Q40
Multiple Choice

Which constraints can be used together to ensure data uniqueness and referential integrity?

Q41
Multiple Choice

Which of the following are true about indexing with UNIQUE constraints?

Q42
Multiple Choice

What operations can be restricted by UNIQUE constraints?

Q43
Multiple Choice

Which of the following are valid reasons to use a UNIQUE constraint?

Q44
Multiple Choice

Which constraints can be combined with UNIQUE constraints for comprehensive data validation?

Q45
Multiple Choice

Which of the following best describes how UNIQUE constraints handle duplicate values?