Returns the smallest integer greater than or equal to the specified value.
ceiling(value)
is a column, variable, or expression whose datatype is exact numeric, approximate numeric, money, or any type that can be implicitly converted to one of these types.
select ceiling(123.45)
124
select ceiling(-123.45)
-123
select ceiling(1.2345E2)
24.000000
select ceiling(-1.2345E2)
-123.000000
select ceiling($123.45)
124.00
select discount, ceiling(discount) from salesdetail where title_id = "PS3333"
discount -------------------- -------------------- 45.000000 45.000000 46.700000 47.000000 46.700000 47.000000 50.000000 50.000000
ceiling, a mathematical function, returns the smallest integer that is greater than or equal to the specified value. The return value has the same datatype as the value supplied.
For numeric and decimal values, results have the same precision as the value supplied and a scale of zero.
ANSI SQL – Compliance level: Transact-SQL extension.
Any user can execute ceiling.
For general information about mathematical functions, see “Mathematical functions”.
Command set