min

Description

Returns the lowest value in a column.

Syntax

min(expression)

Parameters

expression

is a column name, constant, function, any combination of column names, constants, and functions connected by arithmetic or bitwise operators, or a subquery. With aggregates, an expression is usually a column name. For more information, see “Expressions”.

Examples

Example 1

select min(price) from titles
    where type = "psychology"
------------------------
                   7.00 

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute min.

See also

Commands compute clause, group by and having clauses, select, where clause

Functions avg, max