Altering the sizes of databases  Creating tables

Chapter 8: Creating Databases and Tables

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 databases with drop database. Use dbcc dbrepair instead.





Copyright © 2005. Sybase Inc. All rights reserved. Creating tables

View this book as PDF