DROP TABLE Syntax Elements - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
TEMPORARY
The table to be dropped is the materialized instance of a global temporary table.
If you do not specify TEMPORARY and table_name identifies a global temporary table, then the base global temporary definition table is dropped.
If any materialized instances of the base global temporary table exist anywhere in the system, you cannot drop the table and an error is returned.
TEMPORARY is not valid when specified for any database object other than a global temporary table.
TEMPORARY is not valid when specified with the ALL keyword.
FOREIGN
Optional keyword you can specify for readability when dropping a foreign table.
When you drop a foreign table, the external file source is not modified in any way. Only the Vantage local information is removed.
database_name
user_name
Name of the containing database or user for the specified base table or queue table.
This specification is required only if the table to be dropped is contained in a different database than the current database.
table_name
Name of the base table or queue table to be dropped.
The table_name specification cannot identify a journal table.
If the table to be dropped has triggers or join indexes associated with it, you must first drop those triggers and join indexes else the request aborts.
ALL
Drops the base global temporary table definition and its materialized instances when other transactions are not accessing them.
The time required for all open transactions accessing this object to commit may be significant.
ALL is not valid when specified for any database object other than a global temporary table.
ALL is not valid when specified with the TEMPORARY keyword.
If you do not specify ALL and if the global temporary table is materialized in any other session, Vantage aborts the request.