Dropping and Renaming Objects | SQL Fundamentals | VantageCloud Lake - Dropping and Renaming Objects - 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

To drop an object, use the appropriate DDL statement.

Dropping Objects

Object Use
Constraint DROP CONSTRAINT
Error logging table DROP ERROR TABLE
DROP TABLE
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
Volatile table or global temporary table
Primary index
Trigger DROP TRIGGER
User-defined function DROP FUNCTION
This statement supports SQL and C/C++ UDFs:
  • Use this statement to create SQL UDFs.
  • Convert this statement in a BTEQ script using XRMigrationTool to create C/C++ UDFs.

See Creating, Using, and Migrating UDFs to VantageCloud Lake.

Use tdextroutine to drop external routine UDFs. See Drop a C/C++ or Java UDF.

User-defined type DROP TYPE
View DROP VIEW

Renaming Objects

The following table shows which statement or statements to use to rename an object.

Object Use
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 (SQL Form)
View RENAME VIEW