DELETE DATABASE and SQL UDFs - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
imq1591724555718.ditamap
dita:ditavalPath
imq1591724555718.ditaval
dita:id
B035-1184
lifecycle
previous
Product Category
Teradata Vantage™

A DELETE DATABASE statement deletes all the database objects contained in the database. If database objects contained within other databases or users reference any of the deleted objects, the referencing objects are no longer valid.

An SQL UDF can reference different database objects in its definition, including UDTs. It is always possible that such objects might be dropped either individually, or collectively when you submit a DELETE DATABASE request. When this happens, it can invalidate the UDF. Conversely, an SQL UDF can itself be referenced by various database objects. If an SQL UDF in such a relationship is dropped, or if its containing database or user is dropped, those database objects then lose their validity.

For example, suppose you have database df2 that contains a table referenced by an SQL UDF in database pls, and for some reason you decide to delete the contents of df2. The next time a request references the affected SQL UDF, the system aborts the request and returns an error to the requestor.