Multiple choice technology databases

Which of the following constraint types can be used to ensure the value Of an INTEGER column references only positive values.

  1. Unique

  2. Check

  3. Referential

  4. Informational

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

A CHECK constraint is used to enforce domain integrity by validating that column values satisfy a specified condition. To ensure an INTEGER column contains only positive values, you would define a CHECK constraint such as CHECK (column_name > 0). Option A (Unique) ensures only that all values are different but doesn't restrict them to positive values. Option C (Referential) is for foreign key relationships with other tables. Option D (Informational) is not a standard constraint type in DB2.