Programming/PostgreSQL/Databases: Difference between revisions
< Programming | PostgreSQL
Jump to navigation
Jump to search
Brodriguez (talk | contribs) (Create page) |
Brodriguez (talk | contribs) m (Brodriguez moved page PostgreSQL/Databases to Programming/PostgreSQL/Databases) |
(No difference)
|
Revision as of 00:28, 3 November 2020
Creating a New Database
Via Linux Shell
From the PostgreSQL shell:
CREATEDB <database_name>;
Via PostgreSQL Shell
CREATE DATABASE <database_name>;
Deleting a Database
DROP DATABASE <database_name>;
Show All Databases
From the PostgreSQL shell:
\l
Load Database
\c <database_name>
Give Database Privileges to User
From the PostgreSQL shell:
GRANT ALL PRIVILEGES ON DATABASE <database_name> TO <user_name>;