Last active
September 12, 2017 09:24
-
-
Save bastman/7ac77544e42e8461c234e1df4f9ab6af to your computer and use it in GitHub Desktop.
postgres-pgsql-commands
This file contains hidden or 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
# list databases | |
$ SELECT datname FROM pg_database WHERE datistemplate = false; | |
# use database FOO_DB | |
$ \connect FOO_DB; | |
# list tables | |
$ \dt | |
# SELECT FROM TABLE | |
$ SELECT * FROM YOUR_TABLE; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment