您当前的位置: 首页 >  oracle

衣舞晨风

暂无认证

  • 1浏览

    0关注

    1156博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Oracle Greatest()函数

衣舞晨风 发布时间:2014-03-05 14:27:32 ,浏览量:1

GREATEST

The GREATEST function returns the largest 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 smallest expression in a list of expressions, use LEAST.

Return Value

The data type of the first expression.

Syntax

GREATEST (expr [, expr]...)

Arguments

expr

An expression.

Examples

Example 16-3 Finding the Longest Text Expressions

The following statement selects the longest string.

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

Example 16-4 Finding the Largest Numerical Expression

The following statement selects the number with the greatest value.

SHOW GREATEST (5, 3, 18)
18
原文地址:点击打开链接
关注
打赏
1647422595
查看更多评论
立即登录/注册

微信扫码登录

0.0419s