Specifying two constaint for a single table
postgres=#
postgres=#
postgres=# CREATE TABLE products (
postgres(# product_no integer NOT NULL,
postgres(# name text NOT NULL,
postgres(# price numeric NOT NULL CHECK (price > 0)
postgres(# );
CREATE TABLE
postgres=#
postgres=# drop table products;
DROP TABLE
postgres=#
Related examples in the same category