Mega Code Archive

 
Categories / PostgreSQL / Insert Delete Update
 

Omit values

postgres=# postgres=# postgres=# CREATE TABLE products ( postgres(#    product_no integer, postgres(#    name text, postgres(#    price numeric postgres(# ); CREATE TABLE postgres=# -- Omit values postgres=# postgres=# INSERT INTO products (product_no, name) VALUES (1, 'Cheese'); INSERT 0 1 postgres=# postgres=# postgres=# select * from products;  product_no |  name  | price ------------+--------+-------           1 | Cheese | (1 row) postgres=# postgres=# drop table products; DROP TABLE postgres=# postgres=# postgres=# postgres=#