Create table with default column value : Default « Constraints « PostgreSQL






Create table with default column value


postgres=#
postgres=# CREATE TABLE products (
postgres(#    product_no integer,
postgres(#    name text,
postgres(#    price numeric DEFAULT 9.99
postgres(# );
CREATE TABLE
postgres=#
postgres=# drop table products;
DROP TABLE
postgres=#
postgres=#
           
       








Related examples in the same category

1.Changing a Column's Default Value
2.To remove any default value
3.Add and DROP DEFAULT