Mega Code Archive

 
Categories / PostgreSQL / Constraints
 

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=#