Dropping and Renaming Objects | SQL Fundamentals | Teradata Vantage - Dropping and Renaming Objects - Advanced SQL Engine - Teradata Database

SQL Fundamentals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
zwv1557098532464.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1141
lifecycle
previous
Product Category
Teradata Vantage™

To drop an object, use the appropriate DDL statement.

Dropping Objects

Object Use
Constraint DROP CONSTRAINT
Error logging table DROP ERROR TABLE
DROP TABLE
Hash index DROP HASH INDEX
Join index DROP JOIN INDEX
Macro DROP MACRO
Profile DROP PROFILE
Role DROP ROLE
Secondary index DROP INDEX
Stored procedure DROP PROCEDURE
Table DROP TABLE
Global temporary table or volatile table
Primary index
Trigger DROP TRIGGER
User-defined function DROP FUNCTION
User-defined method ALTER TYPE
User-defined type DROP TYPE
View DROP VIEW

Renaming Objects

Teradata SQL provides RENAME statements that you can use to rename some objects. To rename objects that do not have associated RENAME statements, you must first drop them and then recreate them with a new name, or, in the case of primary indexes, use ALTER TABLE.

Object Use
Hash index DROP HASH INDEX and then CREATE HASH INDEX
Join index DROP JOIN INDEX and then CREATE JOIN INDEX
Macro RENAME MACRO
Primary index ALTER TABLE
Profile DROP PROFILE and then CREATE PROFILE
Role DROP ROLE and then CREATE ROLE
Secondary index DROP INDEX and then CREATE INDEX
Stored procedure RENAME PROCEDURE
Table RENAME TABLE
Global temporary table or volatile table
Queue table
Error logging table
Trigger RENAME TRIGGER
User-Defined Function RENAME FUNCTION
User-Defined Method ALTER TYPE and then CREATE METHOD
User-Defined Type DROP TYPE and then CREATE TYPE
View RENAME VIEW

Related Topics

For more information on these statements, including rules that apply to usage, see Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.