Difference between revisions of "Delete database"
Jump to navigation
Jump to search
Line 4: | Line 4: | ||
[[DROP DATABASE]] [IF EXISTS] [[my_database_name]][[;]] | [[DROP DATABASE]] [IF EXISTS] [[my_database_name]][[;]] | ||
Do not forget the <code>;</code> at the end of the line | Do not forget the <code>;</code> at the end of the line | ||
+ | |||
+ | [[DROP DATABASE]] [IF EXISTS] [[my_database_name]] (FORCE) [[;]] | ||
DROP DATABASE database_name; | DROP DATABASE database_name; | ||
Output: | Output: | ||
DROP DATABASE | DROP DATABASE | ||
+ | |||
+ | DROP DATABASE database_name (FORCE); | ||
Related terms: | Related terms: |
Revision as of 15:16, 18 November 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);
Related terms:
Related
ALTER DATABASE ERROR: must be owner of database
See also
Advertising: