What is the purpose of the `CHECK` constraint in SQL?

Advanced SQL Developer Easy

Advanced SQL Developer — Easy

What is the purpose of the `CHECK` constraint in SQL?

Key points

  • `CHECK` constraint restricts the values based on a condition
  • It does not validate uniqueness like a `UNIQUE` constraint
  • It is different from ensuring a column cannot contain NULL values

Ready to go further?

Related questions