Deletes tables, views, or
indexes.
Restriction: |
You cannot use DROP TABLE or DROP INDEX
on a table that is accessed by an engine that does not support UPDATE processing.
|
DROP TABLE table-name <, ... table-name>;
|
DROP
VIEW view-name <, ... view-name>;
|
DROP INDEX index-name <,
... index-name>
FROM table-name;
|
- index-name
-
specifies an index that exists on table-name.
- table-name
-
specifies a PROC SQL table. table-name
can be a one-level name, a two-level libref.table
name, or a physical pathname that is enclosed in single quotation marks.
- view-name
-
specifies a SAS view of any type: PROC SQL view, SAS/ACCESS view,
or DATA step view. view-name can be a one-level
name, a two-level libref.view name, or a physical
pathname that is enclosed in single quotation marks.
-
If you drop a table that is referenced in a view definition and
try to execute the view, then an error message is written to the SAS log that
states that the table does not exist. Therefore, remove references in queries
and views to any tables and views that you drop.
-
If you drop a table with indexed columns, then all the indexes
are automatically dropped. If you drop a composite index, then the index
is dropped for all the columns that are named in that index.
-
You can use the DROP statement to drop a table or view in an external
database that is accessed with the Pass-Through Facility or SAS/ACCESS LIBNAME
statement, but not for an external database table or view that a SAS/ACCESS view
describes.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.