16.10 - Functions - Teradata Database

Teradata Database SQL Fundamentals

Product
Teradata Database
Release Number
16.10
Published
June 2017
Language
English (United States)
Last Update
2018-04-25
dita:mapPath
klx1480972732157.ditamap
dita:ditavalPath
changebar_rev_16_10_exclude_audience_ie.ditaval

The following sections describe functions.

Scalar Functions

Scalar functions take input parameters and return a single value result. Some examples of standard SQL scalar functions are CHARACTER_LENGTH, POSITION, and SUBSTRING.

Aggregate Functions

Aggregate functions produce summary results. They differ from scalar functions in that they take grouped sets of relational data, make a pass over each group, and return one result for the group. Some examples of standard SQL aggregate functions are AVG, SUM, MAX, and MIN.

Built-In Functions

The built-in functions, or special register functions, which have no arguments, return various information about the system and can be used like other literals within SQL expressions. In an SQL query, the appropriate system value is substituted by the Parser after optimization but prior to executing a query using a cachable plan.

Available built-in functions include all of the following:
  • ACCOUNT
  • CURRENT_DATE
  • CURRENT_ROLE
  • CURRENT_TIME
  • CURRENT_TIMESTAMP
  • CURRENT_USER
  • DATABASE
  • DATE
  • PROFILE
  • ROLE
  • SESSION
  • TIME
  • USER

Related Topics

For more information about:
  • Names, parameters, return values, and other details of scalar and aggregate functions, see SQL Functions, Operators, Expressions, and Predicates, B035-1145.
  • Clauses and phrases, see SQL Functions, Operators, Expressions, and Predicates, B035-1145.