DROP statement
Description
Standards and
compatibility
Examples
506
The DROP statement removes the definition of the indicated database
structure. If the structure is a dbspace, all tables in that dbspace must be
dropped prior to dropping the dbspace. If the structure is a table, all data in
the table is automatically deleted as part of the dropping process. Also, all
indexes and keys for the table are dropped by the DROP TABLE statement.
DROP TABLE, DROP INDEX, and DROP DBSPACE are prevented
whenever the statement affects a table that is currently being used by another
connection.
DROP PROCEDURE and DROP FUNCTION are prevented when the
procedure or function is in use by another connection.
DROP DATATYPE is prevented if the data type is used in a table. You must
change data types on all columns defined on the domain in order to drop the
data type. It is recommended that you use DROP DOMAIN rather than
DROP DATATYPE, as DROP DOMAIN is the syntax used in the
ANSI/ISO SQL3 draft.
♦
SQL/92
Entry level feature.
♦
Supported by Adaptive Server Enterprise for those objects
Sybase
that exist in Adaptive Server Enterprise.
♦
Drop the department table from the database.
DROP TABLE department
♦
Drop the
emp_dept
view from the database.
DROP VIEW emp_dept
Need help?
Do you have a question about the Adaptive Server Anywhere and is the answer not in the manual?
Questions and answers