APPX Software Library

Chapter 4: SQL Language Elements

4.9.1.4 MIN

Syntax

MIN ( { [ALL] expression } | { DISTINCT column_ref } )

Description

The aggregate function MIN returns the minimum value in a group of values.

  • The specification of DISTINCT has no effect on the result.
  • The argument column_ref or expression can be of any type.
  • The result of the function is of the same data type as that of the argument.
  • The result is null if the result set is empty or contains only null values.

Example

SELECT MIN (salary)
    FROM employee
    WHERE deptno = 20 ;