16.20 - Usage - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantageâ„¢ SQL Fundamentals

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-02
dita:mapPath
zce1519094756513.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval

To create and use an SQL UDF, follow these steps:

  1. Use CREATE FUNCTION or REPLACE FUNCTION to define the UDF.
  2. Use GRANT to grant privileges to users who are authorized to use the UDF.
  3. Call the function.

Here is a synopsis of the steps you take to develop, compile, install, and use an external UDF:

  1. Write, test, and debug the C, C++, or Javacode for the UDF.
  2. If you are using Java, place the class or classes for the UDF in an archive file (JAR or ZIP) and call the SQLJ.INSTALL_JAR external stored procedure to register the archive file with the database.
  3. Use CREATE FUNCTION or REPLACE FUNCTION to create a database object for the UDF.
  4. Use GRANT to grant privileges to users who are authorized to use the UDF.
  5. Call the function.