PostgreSQL/Math Functions/ceil
Содержание
ceil(1.1), ceil(1.5)
postgres=# select ceil(1.1), ceil(1.5);
ceil | ceil
------+------
2 | 2
(1 row)
postgres=#
ceil(dp or numeric) smallest integer not less than argument
postgres=#
postgres=# -- ceil(dp or numeric) smallest integer not less than argument
postgres=#
postgres=# select ceil(-42.8);
ceil
------
-42
(1 row)
postgres=#
ceiling(dp or numeric) smallest integer not less than argument (alias for ceil)
postgres=# -- ceiling(dp or numeric) smallest integer not less than argument (alias for ceil)
postgres=#
postgres=# select ceiling(-95.3);
ceiling
---------
-95
(1 row)
postgres=#
ceil(x): Returns the smallest whole integer not less than argument (rounds up)
postgres=# -- ceil(x): Returns the smallest whole integer not less than argument (rounds up)
postgres=# SELECT ceil(1.0);
ceil
------
1
(1 row)
postgres=#