Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

Altering
the sizes of databases [Table of Contents] Creating tables

Transact-SQL User's Guide

[-] Chapter 7 Creating Databases and Tables
[-] Dropping databases

Dropping databases

Use the drop database command to remove a database. drop database deletes the database and all of its contents from Adaptive Server, frees the storage space that had been allocated for it, and deletes references to it from the master database.

The syntax is:

drop database database_name [, database_name]... 

You cannot drop a database that is in use, that is, open for reading or writing by any user.

As indicated, you can drop more than one database in a single command. For example:

drop database newpubs, newdb 

You cannot remove damaged database with drop database. Use dbcc dbrepair instead.


Altering
the sizes of databases [Table of Contents] Creating tables