Postgres: Difference between revisions
| Line 10: | Line 10: | ||
dropdb -h <HOSTNAME> -U <User> <DB> | dropdb -h <HOSTNAME> -U <User> <DB> | ||
createdb -h <HOSTNAME> -U <User> <DB> | createdb -h <HOSTNAME> -U <User> <DB> | ||
==Installation== | |||
* [[EDTLaptop1#Postgres|EDT Windows HP Elitebook]] | |||
Revision as of 13:56, 6 October 2021
Operation
psql -h <HOSTNAME> -U <USER> [<DB>] psql <DB> <USER> \l // show databases \c <DB> // connect to DB \d <TABLE> // show schema of table \dt // show tables <SQL>; CREATE DATABASE "<DB>"; // !!! SQL case sensitive, DB to be enclosed in " otherwise no case sensitiveness, semicolon needed dropdb -h <HOSTNAME> -U <User> <DB> createdb -h <HOSTNAME> -U <User> <DB>