Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

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;
 
PREVIOUS NEXT
Tagged: #check #constraint #sql
ADD COMMENT
Topic
Name
6+3 =