PostgreSQL有一个有用的函数叫做GREATEST.它返回传递给它的最大值,如记录的
here.
在SQLite中有什么相当的
作为一个注释,我只需要它与2个参数.
SELECT MAX(1,2,..)
参考:http://www.sqlite.org/lang_corefunc.html
max(X,Y,...)
The multi-argument max() function returns the argument with the maximum value,or return NULL if any argument is NULL. The multi-argument max() function searches its arguments from left to right for an argument that defines a collating function and uses that collating function for all string comparisons. If none of the arguments to max() define a collating function,then the BINARY collating function is used. Note that max() is a simple function when it has 2 or more arguments but operates as an aggregate function if given only a single argument.
(编辑:李大同)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|