Skip to Main Content
SQL in a Nutshell
book

SQL in a Nutshell

by Kevin Kline
December 2000
Intermediate to advanced content levelIntermediate to advanced
224 pages
9h 52m
English
O'Reilly Media, Inc.
Content preview from SQL in a Nutshell

DROP Statements

All of the database objects created with CREATE commands may be destroyed using complementary DROP statements. The DROP command is irreversible and permanent, so it must be used with care. The syntax follows this format:

DROP object_type [owner_name.]object_name

With most vendors, the DROP command fails if the database object is in use by another user. With some vendors, the DROP command fails if the database object has other characteristics. For example, Microsoft SQL Server does not drop a table that is replicated. The table must be removed from replication before it can be dropped.

Warning

It is important to be aware that most vendors do not notify a user if the DROP command creates a dependency problem. Thus, if a table is dropped that is used by a few views and stored procedures elsewhere in the database, no warning is issued. Those other objects simply return failures when they are accessed.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

SQL in a Nutshell, 3rd Edition

SQL in a Nutshell, 3rd Edition

Kevin Kline

Publisher Resources

ISBN: 1565927443