17.10 - DROP - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Database Utilities

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Configuration
Publication ID
B035-1102-171K
Language
English (United States)

The DROP command removes an existing table (created as a result of a system dump) and all of its rows from the specified database on the Teradata system.

Syntax

DROP [ database. ] table ;

Syntax Elements

database
Name of the database in which the table resides. If the database is not specified, the currently set database is assumed. Use a period (.) to separate the database name from the table name.
table
Name of the table to be dropped.

Usage Notes

The DROP command removes the specified table and any tables with the same name that end with a _C, _L, or _M suffix.

In general, enter a DROP command before performing a load operation to remove any existing tables that might have the same name as the table specified on the next LOAD command.

To use the DROP command, you must have the DROP privilege on the specified table.

Example: Dropping a system dump table

Assume that Crash_20000407_1013_02, Crash_20000407_1013_02_C, Crash_20000407_1013_02_L, and Crash_20000407_1013_02_M tables were produced as an result of the previous load operation.

To drop all four tables from the Crashdumps database, type the following:

DROP Crash_20000407_1013_02;

The following appears:

*** Dropping table Crash_20000407_1013_02;
*** Table has been dropped.
*** Dropping table Crash_20000407_1013_02_1;
*** Failure 3807 Table/view 'Crash_20000407_1013_02_1' does not exist.
                Statement# 1, Info =0
*** Dropping table Crash_20000407_1013_02_2;
*** Failure 3807 Table/view 'Crash_20000407_1013_02_2' does not exist.
                Statement# 1, Info =0
*** Dropping table Crash_20000407_1013_02_C;
*** Table has been dropped.
*** Dropping table Crash_20000407_1013_02_C_1;
*** Failure 3807 Table/view 'Crash_20000407_1013_02_C_1' does not exist.
                Statement# 1, Info =0
*** Dropping table Crash_20000407_1013_02_C_2;
*** Failure 3807 Table/view 'Crash_20000407_1013_02_C_2' does not exist.
                Statement# 1, Info =0
*** Dropping table Crash_20000407_1013_02_L;
*** Table has been dropped.
*** Dropping table Crash_20000407_1013_02_L_1;
*** Failure 3807 Table/view 'Crash_20000407_1013_02_L_1' does not exist.
                Statement# 1, Info =0
*** Dropping table Crash_20000407_1013_02_L_2;
*** Failure 3807 Table/view 'Crash_20000407_1013_02_L_2' does not exist.
                Statement# 1, Info =0
*** Dropping table Crash_20000407_1013_02_M;
*** Table has been dropped.
*** Dropping table Crash_20000407_1013_02_M_1;
*** Failure 3807 Table/view 'Crash_20000407_1013_02_M_1' does not exist.
                Statement# 1, Info =0
*** Dropping table Crash_20000407_1013_02_M_2;
*** Failure 3807 Table/view 'Crash_20000407_1013_02_M_2' does not exist.
                Statement# 1, Info =0
*** Dropping table Crash_20000407_1013_02_S;
*** Failure 3807 Table/view 'Crash_20000407_1013_02_S' does not exist.
                Statement# 1, Info =0

Dul displays additional messages if you abort the load operation because it tries to dump tables used by the FastLoad utility even if they do not exist.