15.10 - Example: Dropping an External Function and Unique Function Names - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Release Number
15.10
Published
December 2015
Content Type
Programming Reference
Publication ID
B035-1144-151K
Language
English (United States)

Like Example: Dropping an External Function by Function Name or Specific Function Name, this example demonstrates that you can drop a function definition using either its function name or its specific function name. The example also shows that if the name cannot be resolved to a unique object using the DROP FUNCTION statement you specify, you cannot drop it.

Consider the following function definition.

     CREATE FUNCTION test_image(VARCHAR(5000), INTEGER) …
       SPECIFIC testi_opt1 …;
     CREATE FUNCTION test_image(VARCHAR(5000), FLOAT)…
       SPECIFIC testi_opt2 …;

The following DROP FUNCTION requests both drop this function.

     DROP SPECIFIC FUNCTION testi_opt1;
     DROP FUNCTION test_image(VARCHAR, INTEGER);

The following request fails because there is no instance of a function named test_image that has no parameters.

     DROP FUNCTION test_image();