Check out example codes for "check sql". It will help you in understanding the concepts better.
Code Example 1
ALTER TABLE <table>
ADD CONSTRAINT chk_val CHECK (col in ('yes','no','maybe'))
Code Example 2
CREATE TABLE test(
_id BIGINT PRIMARY KEY NOT NULL,
decision NVARCHAR(5),
CHECK (decision in ('yes','no','maybe'))
);
Code Example 3
CREATE TABLE Persons
(
ID int NOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Age int,
CHECK (Age>=18)
);
Learn ReactJs, React Native from akashmittal.com