15.00 - Dropping and Renaming Objects - Teradata Database

Teradata Database SQL Fundamentals

prodname
Teradata Database
vrm_release
15.00
category
Programming Reference
featnum
B035-1141-015K

Dropping and Renaming Objects

Dropping Objects

To drop an object, use the appropriate DDL statement.

 

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 SQL Data Definition Language.