What is the purpose of the CHECK constraint in DB2?
- Defines the primary key of a table
- Enforces a condition on the values allowed in a column
- Ensures uniqueness of values
- Specifies the foreign key relationships
The CHECK constraint in DB2 allows you to specify a condition that must be met for values entered into a column. It ensures data integrity by enforcing rules on the values allowed in the column, preventing invalid data from being inserted.
Loading...
Related Quiz
- A subquery enclosed within parentheses and used within another SQL statement is called a ________.
- How does DB2 handle simultaneous access to data by multiple transactions?
- DB2 allows for the creation of ________ to enforce complex data integrity rules.
- What is the main advantage of using a common table expression (CTE) over a subquery in DB2?
- In DB2, a UNIQUE constraint ensures that ________.