Chapter 9 SQL Statements
507
DROP DATABASE statement
Use this statement to delete all database files associated with a database.
DROP DATABASE
database-name
Required permissions are set using the database server -gu command-line
option. The default setting is to require DBA authority.
The database must not be in use in order to be dropped.
Not supported on Windows CE.
In addition to deleting the database files from disk, any associated
transaction log file or transaction log mirror file is deleted.
"CREATE DATABASE statement" on page 427
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.
♦
SQL/92 Vendor extension.
♦
Sybase Not supported by Adaptive Server Enterprise.
♦ Drop the database
temp.db
, in the
C:\temp
directory..
DROP DATABASE ’c:\temp\temp.db’
Function
Syntax
Permissions
Side effects
See also
Description
Standards and
compatibility
Examples