Mega Code Archive

 
Categories / PostgreSQL / Insert Delete Update
 

Request default values explicitly for the entire row

postgres=# CREATE TABLE products ( postgres(#    product_no integer, postgres(#    name text, postgres(#    price numeric postgres(# ); CREATE TABLE postgres=# -- Request default values explicitly for the entire row: postgres=# INSERT INTO products DEFAULT VALUES; INSERT 0 1 postgres=# postgres=# postgres=# select * from products;  product_no | name | price ------------+------+-------             |      | (1 row) postgres=# postgres=# drop table products; DROP TABLE postgres=# postgres=#