您的位置:首页 > 数据库 > Oracle

Oracle Least()函数

2014-03-05 14:28 302 查看


LEAST

The LEAST function returns the smallest expression in a list of expressions. All expressions after the first are
implicitly converted to the data type of the first expression before the comparison.

To retrieve the largest expression in a list of expressions, use GREATEST.

Return Value

The data type of the first expression.

Syntax

LEAST (expr [, expr]...)

Arguments
expr
An expression.

Examples

Example 17-38 Finding the Shortest Text Expressions
The following statement returns the shortest string.

SHOW LEAST('Harry','Harriot','Harold')
Harry


Example 17-39 Finding the Smallest Numerical Expressions
The following statement selects the number with the smallest value.

SHOW LEAST (5, 3, 18)
3

原文地址:点击打开链接
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Oracle Least 函数