In order to know that every single value in a given column is according to the condition, we use a constraint known as CHECK. We will declare the command of adding a fresh row or modifying the present row, if the fresh value is according to the constraint. So, the constraint CHECK is used for the better quality of data.
Here, we are going to use a statement for creating a new table;
(NID integer CHECK (NID > 0),
Here, the column NID has a CHECK. This column can not use a value which is less than 1.
The output will give fault as the number is not greater than zero.
It is important to know that this constraint can not be used in MYSQL.