# Method Sql.pgsql()->drop_db()

Method drop_db

  ``final` `void` drop_db(`string` `db`)`

Description

  This function destroys a database and all the data it contains (assuming we have sufficient privileges to do so). It is not possible to delete the database you're currently connected to. You can connect to database `"template1"` to avoid connecting to any live database.

Parameter `db`

  Name of the database to be deleted.

See also

  create_db()