Which type of constraint in DB2 ensures data integrity by enforcing uniqueness?

  • Primary Key
  • Foreign Key
  • Check Constraint
  • Unique Constraint
A Unique Constraint in DB2 ensures data integrity by enforcing uniqueness in a specific column or combination of columns, ensuring that each value in the column(s) is unique across the table. This constraint prevents duplicate entries, ensuring data accuracy and consistency. Therefore, the correct option is a Unique Constraint. Primary Key also enforces uniqueness but additionally implies uniqueness and not nullity, making Unique Constraint a more general answer for ensuring uniqueness. 
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *