Difference between revisions of "Delete database"

From wikieduonline
Jump to navigation Jump to search
Line 22: Line 22:
  
 
== Related ==
 
== Related ==
* [[DELETE]]
+
* <code>[[DELETE]]</code>
* [[DROP TABLE]]
+
* <code>[[DROP TABLE]]</code>
 
* <code>[[CREATE DATABASE]]</code>
 
* <code>[[CREATE DATABASE]]</code>
 
* <code>[[\list]]</code>
 
* <code>[[\list]]</code>

Revision as of 11:39, 16 December 2022

PostgreSQL

DROP DATABASE [IF EXISTS] my_database_name;

Do not forget the ; at the end of the line

DROP DATABASE [IF EXISTS] my_database_name (FORCE) ;
DROP DATABASE database_name;
Output:
DROP DATABASE
DROP DATABASE database_name (FORCE);


ERROR: database "XXXXX" is being accessed by other users
DETAIL: There are 4 other sessions using the database

Related terms:

Related

See also

Advertising: