totn MariaDB Functions

MariaDB: CEILING Function

This MariaDB tutorial explains how to use the MariaDB CEILING function with syntax and examples.

Description

The MariaDB CEILING function returns the smallest integer value that is greater than or equal to a number.

Syntax

The syntax for the CEILING function in MariaDB is:

CEILING( number )

Parameters or Arguments

number
The value used to find the smallest integer value.

Note

Applies To

The CEILING function can be used in the following versions of MariaDB:

  • MariaDB 10

Example

Let's look at some MariaDB CEILING function examples and explore how to use the CEILING function in MariaDB.

For example:

SELECT CEILING(12.5);
Result: 13

SELECT CEILING(12.1);
Result: 13

SELECT CEILING(12);
Result: 12

SELECT CEILING(-12.7);
Result: -12

SELECT CEILING(-12.3);
Result: -12

SELECT CEILING(-12);
Result: -12