Answers for "check constraint in values"

SQL
4

sql constraint check value in list

ALTER TABLE <table>
ADD CONSTRAINT chk_val CHECK (col in ('yes','no','maybe'))
Posted by: Guest on May-24-2020
0

check constraint in sql

#Add Check
ALTER TABLE Persons
ADD CONSTRAINT CHK_PersonAge CHECK (Age>=18 AND City='Sandnes');

#Drop Check 
ALTER TABLE Persons
DROP CHECK CHK_PersonAge;
Posted by: Guest on February-24-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language