Contents Index DROP statement DROP CONNECTION statement

ASA SQL Reference
  SQL Statements

DROP DATABASE statement


Description 

Use this statement to delete all database files associated with a database.

Syntax 

DROP DATABASE database-name [ KEY key ]

Usage 

The DROP DATABASE statement physically deletes all associated database files from disk. If the database file does not exist, or is not in a suitable condition for the database to be started, an error is generated.

DROP DATABASE cannot be used in a stored procedure.

Permissions 

Required permissions are set using the database server -gu option. The default setting is to require DBA authority.

The database must not be in use in order to be dropped.

You must specify a key if you want to drop a strongly encrypted database

Not supported on Windows CE.

Side effects 

In addition to deleting the database files from disk, any associated transaction log file or transaction log mirror file is deleted.

See also 

CREATE DATABASE statement

Encryption Key connection parameter [DBKEY]

Standards and compatibility 
Example 

Drop the database temp.db, in the C:\temp directory..

DROP DATABASE 'c:\temp\temp.db'

Contents Index DROP statement DROP CONNECTION statement