©SQL :: Manager
HomeProgram InformationTechnical detailsFree downloadDonate for a cup of coffee
myway SQL Manager for MySQL and MariaDB, Download on Uptodown
SQL functionMySQLMariaDB

The CEILING SQL Function in MySQL and MariaDB - Round up to integer number

CEILINGSyntax:CEILING(Number)
Return value:INTEGER
Synonyms:CEIL
Function type:Numeric function
Function Description

The CEILING() function returns the smallest integer value that's greater than or equal to "Number".

Character strings as arguments are interpreted as numbers.

If there are invalid values ​​in the argument, the function returns 0.

The CEILING() function returns NULL if the value of "Number" is NULL.

SQL Examples for the CEILING function

 1
 2
 3
 4
 5
 6
 7

select ceiling(4.9);
select ceiling(4.1);
select ceiling('6.3');
select ceiling('');
select ceiling(null);

ceiling(4.9)
int(4)
5
ceiling(4.1)
int(4)
5
ceiling('6.3')
double(17)
7
ceiling('')
double(17)
0
ceiling(null)
double(17)
NULL
The examples were created with the MyWAY SQL manager: Download

How to use the CEILING() function in MySQL and MariaDB databases

The CEILING() (or CEIL()) function in MySQL and MariaDB is commonly used when a value needs to be rounded up to the nearest whole number. This can be useful in various applications, such as calculating tax amounts, showing rounded quantities, or ensuring correct rounding in math calculations.
BIT_XORCASTCEILCEILINGCHARCHAR_LENGTHCHARACTER_LENGTH

Further MySQL und MariaDB SQL Numeric functions

BIT_COUNTBIT_COUNT(Integer)
More about BIT_COUNT Function

CEILCEIL(Number)
More about CEIL Function

CRC32CRC32(String)
More about CRC32 Function

CRC32CCRC32C([Parameter], String)

FLOORFLOOR(Number)
More about FLOOR Function

SIGNSIGN(Number)
More about SIGN Function

ABSABS(Number)
More about ABS Function

ACOSACOS(Number)
More about ACOS Function

ASINASIN(Number)
More about ASIN Function

ATANATAN(Number [, Number2])
More about ATAN Function

ATAN2ATAN2(Number [, Number2])
More about ATAN2 Function

COSCOS(Number)
More about COS Function

COTCOT(Number)
More about COT Function

DEGREESDEGREES(Number)
More about DEGREES Function

EXPEXP(Number)
More about EXP Function

LNLN(Number)
More about LN Function

LOGLOG([Base], Number)
More about LOG Function

LOG10LOG10(Number)
More about LOG10 Function

LOG2LOG2(Number)
More about LOG2 Function

MODMOD(Number, Divider)
More about MOD Function

POWPOW(Number, Exponent)
More about POW Function

POWERPOWER(Number, Exponent)
More about POWER Function

PIPI()
More about PI Function

RADIANSRADIANS(Number)
More about RADIANS Function

RANDRAND([Number])
More about RAND Function

ROUNDROUND(Number [, Decimals])
More about ROUND Function

SINSIN(Number)
More about SIN Function

SQRTSQRT(Number)
More about SQRT Function

TANTAN(Number)
More about TAN Function

TRUNCATETRUNCATE(Number, Decimals)
More about TRUNCATE Function

Numeric functionsString functionsRegular ExpressionsDate and Time functions
Comparison functionsEncryption & CompressionConversion functionsNULL functions
Aggregate functionsWindow functionsJSON functionsGeometric functions
Sequence functionsInformation functionsDynamic ColumnsMiscellaneous functions
More information about the CEILING SQL function: mysql.com and mariadb.com and w3schools.com
Updated: 2023-09-24ImprintContactTerms & conditionsPrivacy & CookiesUpdatesSitemapFacebookLinkedinTwitterStatistics©2020-2024 Heino Cunze-Fischer