Databases
List databases
\l
Connect to database
\c <database_name>
Show current database
SELECT current_database();
CREATE DATABASE <database_name> WITH OWNER <username>;
DROP DATABASE IF EXISTS <database_name>;
ALTER DATABASE <old_name> RENAME TO <new_name>;
Comments