Postgres: Difference between revisions
| Line 7: | Line 7: | ||
<SQL>; | <SQL>; | ||
dropdb -h <HOSTNAME> -U <User> <DB> | dropdb -h <HOSTNAME> -U <User> <DB> | ||
createdb -h <HOSTNAME> -U <User> <DB> | |||
Revision as of 07:10, 17 September 2021
Operation
psql -h <HOSTNAME> -U <USER> [<DB>] psql <DB> <USER> \l // show databases \c <DB> // connect to DB \dt // show tables <SQL>; dropdb -h <HOSTNAME> -U <User> <DB> createdb -h <HOSTNAME> -U <User> <DB>