Versions available for this page: CUBRID 8.2.1 | CUBRID 8.3.0 | CUBRID 8.3.1 | CUBRID 8.4.0 | CUBRID 8.4.1 | CUBRID 8.4.3 | CUBRID 9.0.0 |
The MIN function retrieves the minimum value of the specified expression or path expression. The character strings are compared in dictionary order. The minimum value is the one closest to the first entry in the dictionary. For other data types, the minimum value is the smallest value. The MIN function cannot be used for attributes that include collections or object domains (user-defined classes or multimedia classes).
MIN ( [ DISTINCT | UNIQUE | ALL ] expression )
With expression for the MIN function, you can specify a single-value expression.
The following is an example of returning the minimum number of gold medals that Korea won in the Olympic Games from 1988 to 2004.
SELECT MIN(gold)
FROM participant
WHERE nation_code = 'KOR';
Result : 7