更新时间:2023-02-06 17:48:17
尝试
SELECT CEILING(85.0/30)
为了比较
SELECT 85.0 / 30, 85 / 30
第一个例子使用浮点数,第二个例子使用整数,所以结果在达到天花板函数之前四舍五入.你要做的是
The first example uses floats, the second uses ints, so the result is rounded before the ceiling function is hit. What you do is
SELECT CEILING(2)
而不是
SELECT CEILING(2.833333)