PostgreSQL Drop Database

PostgreSQL Drop Database command removes a database from PostgreSQL server. The user who executes this command must be a database superuser or the owner of the database. We cant drop a database if anyone is accessing it.

Syntax:

dropdb [connection-option…] [option…] dbname

Example:

To remove the database ‘pinfo’ from PostgreSQL server.

drop database pinfo;

Powered by k2schools