A mathematical function that returns the smallest greater integer greater/equal to the number sent as a parameter (CEILING in Transact-SQL).
CEILING( expression )
CEIL( <input_expr> [, <scale_expr> ] )
Math.ceil( expression )
Code:
SELECT CEILING(642.20);
Result:
CEILING(642.20)|
---------------+
643 |
Code:
Result:
CEIL(642.20)|
------------+
643 |
Code:
CREATE OR REPLACE FUNCTION compute_ceil(a double)
RETURNS double
LANGUAGE JAVASCRIPT
AS
$$
return Math.ceil(A);
$$
;
SELECT COMPUTE_CEIL(642.20);
Result:
COMPUTE_CEIL(642.20)|
--------------------+
643|