PostgreSQL


Tags:
postgreSQL Notes:
-------------------------------------------------------------------

create a database:
createdb mydb

delete a database:
dropdb mydb

accessing a database:
psql mydb

create a table:
CREATE TABLE weather (
    city            varchar(80),
    temp_lo         int,           -- low temperature
    temp_hi         int,           -- high temperature
    prcp            real,          -- precipitation
    date            date
);


Delete a table:
DROP TABLE tablename;

Insert into database: