Drop Statement - Sybase Adaptive Server Anywhere Reference

Table of Contents

Advertisement

DROP statement

Function
Syntax
Permissions
Side effects
See also
Use this statement to remove objects from the database.
DROP
{ DATATYPE | DOMAIN } datatype-name
| DBSPACE dbspace-name
| EVENT event-name
| FUNCTION [ owner .] function-name
| INDEX [ [ owner ]. table-name .] index-name
| MESSAGE msgnum
| PROCEDURE [ owner .] procedure-name
| TABLE [ owner .] table-name
| TRIGGER [ [ owner .] table-name .] trigger-name
| VIEW [ owner .] view-name
Any user who owns the object, or has DBA authority, can execute the DROP
statement.
For DROP DBSPACE, you must be the only connection to the database.
A user with ALTER permissions on the table can execute DROP TRIGGER.
A user with REFERENCES permissions on the table can execute DROP
INDEX.
Global temporary tables cannot be dropped unless all users that have
referenced the temporary table have disconnected.
Automatic commit. Clears the Data window in Interactive SQL. DROP
TABLE and DROP INDEX close all cursors for the current connection.
Local temporary tables is an exception; no commit is performed when one is
dropped.
When a view is dropped, all procedures and triggers are unloaded from
memory, so that any procedure or trigger that references the view reflects the
fact that the view does not exist. The unloading and loading of procedures
and triggers can have a performance impact if you are regularly dropping and
creating views.
"CREATE DATABASE statement" on page 427
"CREATE DOMAIN statement" on page 433
"CREATE INDEX statement" on page 448
"CREATE FUNCTION statement" on page 445
"CREATE PROCEDURE statement" on page 453
"CREATE TABLE statement" on page 466
"CREATE TRIGGER statement" on page 477
"CREATE VIEW statement" on page 482
Chapter 9 SQL Statements
505

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents