sql check constraints example
Example: sql constraint check value in list
CREATE TABLE test(
_id BIGINT PRIMARY KEY NOT NULL,
decision NVARCHAR(5),
CHECK (decision in ('yes','no','maybe'))
);
CREATE TABLE test(
_id BIGINT PRIMARY KEY NOT NULL,
decision NVARCHAR(5),
CHECK (decision in ('yes','no','maybe'))
);