What is a constraint?

Constraint can be used to specify the limit on the data type of table. The constraint can be specified while creating or altering the table statement. Samples of constraint are.

  • NOT NULL
  • CHECK
  • DEFAULT
  • UNIQUE
  • PRIMARY KEY
  • FOREIGN KEY