Created
December 5, 2018 18:04
-
-
Save ph4un00b/6ec8603035c9c5e49500d07088bf0aea to your computer and use it in GitHub Desktop.
postgresql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\? -> help | |
create database JAMON; -> create DB | alternative: $ createdb JAMOM | |
\l -> list db's | |
drop database JAMON; -> drop DB | |
\q -> exits | |
\c JAMON -> switch over DB | |
\d TABLE? -> describe DB or TABLE | |
create table NAME(\n column TYPE, ...); -> start modeling table | |
SERIAL, TEXT -> column types | |
insert into TABLE(column) values('value'); -> fill the table | |
select * from TABLE; -> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment