Mega Code Archive

 
Categories / PostgreSQL / Insert Delete Update
 

The data values are listed in the order in which the columns appear in the table, separated by commas

postgres=# postgres=# -- Inserting Data postgres=# postgres=# -- The data values are listed in the order in which the columns appear in the table, separated by commas. postgres=# postgres=# CREATE TABLE products ( postgres(#    product_no integer, postgres(#    name text, postgres(#    price numeric postgres(# ); CREATE TABLE postgres=# INSERT INTO products VALUES (1, 'Cheese', 9.99); INSERT 0 1 postgres=# postgres=# select * from products;  product_no |  name  | price ------------+--------+-------           1 | Cheese |  9.99 (1 row) postgres=# postgres=# drop table products; DROP TABLE postgres=#