How does the UNIQUE constraint differ from the PRIMARY KEY constraint in DB2?
- Allows NULL values and duplicate values
- Allows NULL values but enforces uniqueness
- Allows duplicate values but enforces uniqueness
- Does not allow NULL values but enforces uniqueness
The UNIQUE constraint in DB2 ensures that all values in a column (or a combination of columns) are unique, but it allows NULL values. On the other hand, the PRIMARY KEY constraint also enforces uniqueness but does not allow NULL values, and it uniquely identifies each row in a table.
Loading...
Related Quiz
- To verify a successful installation, you can check for the presence of ________.
- The XML Declaration in DB2 specifies the ________ of the XML standard being used.
- What are the key components of a comprehensive disaster recovery plan for a DB2 environment?
- Stored procedures in DB2 can be invoked from ________.
- What does the INSERT INTO statement do in SQL?