Specifying the column relation : Column Relations « Constraints « PostgreSQL






Specifying the column relation


postgres=#
postgres=#
postgres=# CREATE TABLE products (
postgres(#    product_no integer,
postgres(#    price numeric CHECK (price > 0),
postgres(#    discounted_price numeric CHECK (discounted_price > 0),
postgres(#    CHECK (price > discounted_price)
postgres(# );
CREATE TABLE
postgres=# drop table products;
DROP TABLE
postgres=#
postgres=#
           
       








Related examples in the same category