MS SQL Server – 18 – Integrity Constraints MCQ

18 – Integrity Constraints MCQ

Best of luck!

1 / 25

1. What is the primary purpose of integrity constraints in a database?

2 / 25

2. In SQL Server, which type of integrity constraint ensures that all values in a column are unique within a table?

3 / 25

3. What is referential integrity in the context of a database?

4 / 25

4. In SQL Server, which type of constraint is used to enforce referential integrity between two tables?

5 / 25

5. What is the purpose of a Foreign Key constraint in SQL Server?

6 / 25

6. In SQL Server, what happens if a Foreign Key constraint is violated?

7 / 25

7. Which SQL statement is used to create a Foreign Key constraint in SQL Server?

8 / 25

8. What is the primary purpose of a Check constraint in SQL Server?

9 / 25

9. In SQL Server, how is a Check constraint defined?

10 / 25

10. Which SQL statement is used to create a Check constraint in SQL Server?

11 / 25

11. In SQL Server, what is the primary purpose of the Unique constraint?

12 / 25

12. Which SQL statement is used to create a Unique constraint in SQL Server?

13 / 25

13. What is a domain in the context of database design?

14 / 25

14. In SQL Server, how can you enforce domain integrity?

15 / 25

15. What is the primary purpose of a Primary Key constraint in SQL Server?

16 / 25

16. Which SQL statement is used to create a Primary Key constraint in SQL Server?

17 / 25

17. In SQL Server, what is the purpose of the “CASCADE” option for a Foreign Key constraint?

18 / 25

18. What is the role of the “NO ACTION” option for a Foreign Key constraint in SQL Server?

19 / 25

19. In SQL Server, what is the purpose of the “SET NULL” option for a Foreign Key constraint?

20 / 25

20. Which SQL statement is used to drop a constraint in SQL Server?

21 / 25

21. In SQL Server, what is the role of the “SET DEFAULT” option for a Foreign Key constraint?

22 / 25

22. What is the primary purpose of a Unique constraint in SQL Server?

23 / 25

23. In SQL Server, which keyword is used to specify a default value for a column when creating a table?

24 / 25

24. What is the role of the “CASCADE” option for a Delete operation in SQL Server?

25 / 25

25. In SQL Server, how can you ensure referential integrity when a record in a parent table is deleted?

Your score is

0%