Created
July 12, 2012 06:11
-
-
Save aderyabin/3096201 to your computer and use it in GitHub Desktop.
PG shortkeys
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
| mysql: SHOW TABLES | |
| postgresql: \d | |
| postgresql: SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'; | |
| mysql: SHOW DATABASES | |
| postgresql: \l | |
| postgresql: SELECT datname FROM pg_database; | |
| mysql: SHOW COLUMNS | |
| postgresql: \d table | |
| postgresql: SELECT column_name FROM information_schema.columns WHERE table_name ='table'; | |
| mysql: DESCRIBE TABLE | |
| postgresql: \d+ table | |
| postgresql: SELECT column_name FROM information_schema.columns WHERE table_name ='table'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment