VistaDB 6
VistaDB / Developer's Guide / SQL Reference / Functions / Aggregate Functions / MAX
In This Topic
    MAX
    In This Topic

    Returns the maximum numeric value in a column.

    May not be used with bit columns. Subqueries and additional aggregate functions are not allowed.

    MAX(colName) Applies the aggregate function to all values for the given column.

    MAX(ALL colName) Applies the aggregate function to all values. ALL is the default.

    MAX(DISTINCT colName) evaluates colName for each unique row in a table. DISTINCT is not meaningful with MAX and is available for SQL-92 compatibility only.

    During join queries a colName must be fully qualified using the table name as well.

    Example:

    MAX(table.colName)



    Remarks

    DISTINCT is not meaningful with the MAX command and should not be used.

    Example

    SELECT MAX(column) FROM table
    
    See Also