This Oracle tutorial explains how to use the Oracle/PLSQL GREATEST function with syntax and examples.Description The Oracle/PLSQL GREATEST function returns the greatest value in a list of expressions.Syntax The
Character comparison is based on the numerical codes of the characters in the database character set and is performed on whole strings treated as one sequence of bytes, rather than character by character. If the value returned by this function is character data, then its data type is VARCHAR2...
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 Val...
ORDER是Oracle中的保留字,如果它是表的名称,则您应该使用类似“YOUR_OWNER_NAME”.“ORDER”...的内...
in the database character set and is performed on whole strings treated as one sequence of bytes, rather than character by character. If the value returned by this function is character data, then its data type is VARCHAR2 if the first expr is a character data type and NVARCHAR2 if the ...
函数如下:create or replace function lrm_fun_greatest(v_str1 in varchar2,v_str2 in varchar2,v_str3 in varchar2 default ' ',v_str4 in varchar2 default ' ',v_str5 in varchar2 default ' ',v_str6 in varchar2 default ' ',v_str7 in varchar2 default ' ',v...
The SQL GREATEST function returns the“greatest” or largest value in a set of valuesthat you provide to it. The SQL LEAST function returns the“least” or smallest value in a set of valuesthat you provide to it, and it’s the opposite of the GREATEST function. ...
The greatest function can be used to compare any type of data, including strings and objects. For example, if you want to find the longest string in a set of strings, the greatest function can be used to return the longest string. It can also be used to find the most valuable object ...
(2,1): 2 GREATEST('2',1,0): 2 GREATEST('a','b','c'): c GREATEST('a', NULL, 'c'): NULL GREATEST('2014-05-15','2014-06-01'): 2014-06-01 1 row in set obclient> SELECT GREATEST(2); ERROR 1582 (42000): Incorrect parameter count in the call to native function '...
2,1): 2 GREATEST('2',1,0): 2 GREATEST('a','b','c'): c GREATEST('a', NULL, 'c'): NULL GREATEST('2014-05-15','2014-06-01'): 2014-06-01 1 row in set obclient> SELECT GREATEST(2); ERROR 1582 (42000): Incorrect parameter count in the call to native function 'greatest...