|
Category: ASE: Functions: Aggregate Functions
min()
The
aggregate function
min()
determines the lowest
value
in a
column
of a
table.
Syntax of the Aggregate Function min()
The parameters of the Aggregate Function min()
expression
The parameter "expression"
of the function min() is a placeholder for a
column name.
It is also possible to declare several column names, a
subquery
and
constants.
Usage of the Aggregate Function min()
The function min() can be used to query
columns
which have been defined with
numeric datatypes
and
datetime datatypes.
It cannot be used for queries on
bit
columns. When querying columns defined with
character
datatypes, min() will find the lowest
value
according to the specified sort order, also called
collating sequence.
The function min() ignores
NULL
values. In addition, min() automatically converts the datatypes
char
to
varchar
and
unichar
to
univarchar
and removes all blanks at the end of a string.
Example for the Aggregate Function min()
Returns the lowest value in the column "column_name" of the table "table_name".
select min(column_name) from table_name
See also:
ASE T-SQL - Aggregate Functions, avg(), count(*), count(), count_big(), max(), sum().
|