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

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Teradata Database
Release Number
20.00
Published
June 2025
ft:locale
en-US
ft:lastEdition
2026-09-11
dita:mapPath
mbm1747160743883.ditamap
dita:ditavalPath
jlp1749501702948.ditaval
dita:id
mdr1472255012272
lifecycle
latest

Creates a table function definition.

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