Answers for "how to add CHECK constraint to a column in postgres"

SQL
0

how to add CHECK constraint to a column in postgres

alter table foo 
   add constraint check_positive check (some_code in ('A','B'));
Posted by: Guest on August-13-2021
0

how to add CHECK constraint to a column in postgres

ALTER TABLE foo
    ADD CHECK (column_1 > 2);
Posted by: Guest on August-13-2021

Code answers related to "how to add CHECK constraint to a column in postgres"

Code answers related to "SQL"

Browse Popular Code Answers by Language