SQL Function Types | Teradata Vantage - 17.10 - Types of SQL Functions - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1145-171K
Language
English (United States)
Function Type Definition
Scalar The arguments are individual scalar values of either the same or mixed type that can have different meanings.

The result is a single value or null.

Scalar functions can be used in any SQL statement where an expression can be used.

Aggregate The argument is a group of rows.

The result is a single value or null.

Normally aggregate functions are used in the expression list of a SELECT statement and in the summary list of a WITH clause.

Table The arguments are individual scalar values of either same or mixed type that can have different meanings.

The result is a table.

Table functions can be used only within the FROM clause of a SELECT statement.

Table functions are a form of user-defined functions and are described in Teradata Vantageā„¢ - SQL External Routine Programming , B035-1147 .

Ordered Analytical The arguments are any normal SQL expression.

The result is handled the same way as any other SQL expression. It can be a result column or part of a more complex arithmetic expression.

Ordered analytical functions are used in operations that require an ordered set of results rows or that depend on values in a previous row.