PostgreSQL DROP DATABASE

DROP DATABASE
To drop or eliminate a particular PostgreSQL database, one can either use the UI or can delete or remove the PostgreSQL database using the DROP database command.

Syntax:

DROP DATABASE name;  

Parameters:
name: It is used to specify the name of the database to be eliminated.

Example:

DROP DATABASE country;

Explanation:
The ‘country’ database will be removed.

DROP Database using UI:

To drop a database using UI, select the database to delete and right-click on that.

Example:

  • To delete the ‘country’ database, select the database and right-click on that.
  • Click on “Drop” from the dropdown menu.
  • Click on “YES” from the generated pop-up box.