DROP TABLE Syntax Elements - Teradata Vantage - Analytics Database

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-06
dita:mapPath
jco1628111346878.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
mdr1472255012272
lifecycle
latest
Product Category
Teradata Vantageā„¢
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, hash indexes, or join indexes associated with it, you must first drop those triggers, hash indexes, and join indexes else the request aborts.
ALL
The base global temporary table definition and all its materialized instances are to be dropped when they are not being accessed by any other transactions.
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.
Take care in using this option because the time required for all open transactions accessing this object to commit might be significant.
If you do not specify ALL and if the global temporary table is materialized in any other session, Vantage aborts the request.