SQLite等同于PostgreSQL的GREATEST函数

前端之家收集整理的这篇文章主要介绍了SQLite等同于PostgreSQL的GREATEST函数前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
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.

原文链接:https://www.f2er.com/sqlite/197764.html

猜你在找的Sqlite相关文章