CREATE FUNCTION Statements

CREATE FUNCTION statements can create two different kinds of functions:

While you use CREATE FUNCTION to create both SQL and scalar functions, you use a different syntax for each function type. For more information, see:

About Creating User Defined Transform Functions (UDTFs)

You can use a similar SQL statement to create user-defined transform functions. User defined transform functions (UDTFs) operate on table segments and return zero or more rows of data. The data they return can be an entirely new table, unrelated to the schema of the input table, including having its own ordering and segmentation expressions. They can only be used in a query's SELECT list. For details about creating a UDTF, see CREATE TRANSFORM FUNCTION.