DROP DATABASE
  
  SQL - Language Statements
 
 
  
   DROP DATABASE
  
  
   Destroys an existing database
  
 
 
  
   1999-07-20
  
  
DROP DATABASE name
  
  
   
    1998-04-15
   
   
    Inputs
   
   
    
     
      name
      
       
	The name of an existing database to remove.
       
      
     
    
   
  
  
   
    1998-04-15
   
   
    Outputs
   
   
    
     
      
DESTROYDB
       
      
       
	This message is returned if the command is successful.
       
      
     
     
      
WARN: destroydb: database "name" does not exist.
       
      
       
	This message occurs if the specified database does not exist.
       
      
     
     
      
	ERROR:  destroydb cannot be executed on an open database
       
      
       
	This message occurs if the specified database does not exist.
       
      
     
    
   
  
 
 
 
  
   1998-04-15
  
  
   Description
  
  
   DROP DATABASE removes the catalog entries for an existing
   database and deletes the directory containing the data.
   It can only be executed by the database administrator
   (See the CREATE DATABASE command for details).
  
  
   
    1998-04-15
   
   
    Notes
   
   
    This query cannot be executed while connected to the target
    database. It is usually preferable to use
    
    instead.
   
   
    Refer to
     and
    
    for information on how to create a database.
   
  
 
 
  
   Compatibility
  
  
   
    1998-04-15
   
   
    SQL92
   
   
    DROP DATABASE statement is a
    Postgres language extension;
    there is no such command in SQL92.