Previous Topic: Scalar FunctionsNext Topic: Description


Rules for Scalar Functions

Scalar functions may be nested within scalar functions. For example:

DATE(TIMESTAMP(LASTCHANGED)) results in the conversion of the value in a column from a string representation of a TIMESTAMP into a TIMESTAMP value and then extracts the DATE from that TIMESTAMP.

Scalar functions may be nested within column functions. For example:

AVG(YEAR(HIREDATE)) results in the average year all hiring was done.

Column functions may be nested within scalar functions. For example:

YEAR(MAX(HIREDATE)) results in the last year hiring was done.