📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

Which of the following is a valid use of the CHECK constraint?

A. CHECK (Salary > 0) ✅
B. CHECK (Salary cannot be empty)
C. CHECK (Salary is unique)
D. CHECK (Salary links to another table)

Correct Answer: A. CHECK (Salary > 0)

Explanation

  • CHECK (Salary > 0) enforces a valid range for salary.
  • Uniqueness is UNIQUE, linking is FOREIGN KEY and emptiness is NOT NULL.