MAX Function

Purpose

Returns the greatest of one or more values.

Syntax

MAX(x,…)

Parameters

x and any subsequent values are arithmetic values.

Description

The MAX function returns the largest of a set of arithmetic values. x and any subsequent values are converted to a common arithmetic data type (using the conversion rules for arithmetic infix operators) before the operation is performed. x and any subsequent values cannot be string values. The result is the largest of these converted values and has the common arithmetic data type. The maximum number of arguments is 64.

Examples

MAX(5, -118, 1)        /* returns 5 */
MAX(12.3, 13, 9.68)    /* returns 13.0 */

Restrictions

None.