-
Notifications
You must be signed in to change notification settings - Fork 0
PostgreSQL
adriennelim edited this page Mar 28, 2019
·
1 revision
psql
/c <db_name> //--> connect to db
\dt //--> show all tables
\i path_to_sql_file //--> load sql file into postgres
DROP DATABASE IF EXISTS <db_name>;
CREATE DATABASE <db_name>;
\connect <db_name>
CREATE TABLE <table_name> (
id SERIAL PRIMARY KEY,
col_1 VARCHAR(100),
col_2 VARCHAR(255)
);