CREATE/REPLACE FUNCTION SQL Statement | VantageCloud Lake - CREATE FUNCTION and REPLACE FUNCTION (Table Form) - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530
This statement is only supported on the Block File System on the primary cluster. It is not available for the Object File System.

Creates a table function definition.

You cannot use CREATE/REPLACE FUNCTION or CREATE/REPLACE PROCEDURE to create user-defined functions or external stored procedures in C/C++ or Java in VantageCloud Lake. To create, migrate, and manage user-defined functions or external stored procedures, you must use the External Routine Installation Tool (tdextroutine) to create and manage them. See Create, Use, and Migrate UDFs and External Stored Procedures in VantageCloud Lake

ANSI Compliance

CREATE FUNCTION (Table Form) is compliant with the ANSI SQL:2011 standard.

Required Privileges

You must have explicit CREATE FUNCTION privileges on the database in which the table function is to be contained to perform the CREATE FUNCTION statement.

The system does not grant the CREATE FUNCTION privilege automatically when you create a database or user: you must grant that privilege explicitly.

CREATE FUNCTION is not granted implicitly on the databases and functions owned by a database or user unless the owner also has an explicit WITH GRANT OPTION privilege defined for itself.

Privileges Granted Automatically

The following privileges are granted automatically to the creator of a table function:
  • DROP FUNCTION
  • EXECUTE FUNCTION