CEILING() Function in MySQL Last Updated : 21 Jan, 2021 Comments Improve Suggest changes Like Article Like Report CEILING() function :This function in MySQL is used to return the smallest integer value that is greater than or equal to a specified number. For example, if the specified number is 4.6, this function will return the integer value of 5 that is greater than 4.6 or if a specified number is 5, this function will return 5 that is equal to 5.Features : This function is used to find the smallest integer value that is greater than or equal to a specified number.This function accepts a single parameter.The accepted parameter is a numeric value of integer or float data type. Syntax : CEILING(number) Parameter :This method accepts a parameter as given below - number - Specified numeric value. Returns : It returns the smallest integer value that is greater than or equal to a specified number.Example-1 :Getting the smallest number 1 that is greater than the specified numeric value 0.8. SELECT CEILING(0.8); Output : 1 Example-2 :Getting the smallest number 4 that is greater than the specified numeric value "3.1415926535897931" which is the value of pi. Here the value of pi has been returned from the function PI() and then the function CEILING() function takes this value of pi as an argument and returned the value 4. SELECT CEILING(PI()); Output : 4 Example-3 :Getting the number 14 that is same as the returned random value between 6 and 20. Here the FLOOR() function will return a random number between 6 and 20 then the function CEILING() takes this returned value as parameter and returns the same number 14. SELECT CEILING(FLOOR(6 + RAND()*(20 - 6 + 1))); Output : 14 Example-4 :Getting the smallest number 433 that is greater than the specified numeric value "432.8" which is the absolute value of "-432.8" returned by the function ABS(). The CEILING() function takes the value "432.8" as the parameter and returns the value "433". SELECT CEILING(ABS(-432.8)); Output : 433 Application :This function is used to return the smallest integer value that is greater than or equal to a specified number. Comment More infoAdvertise with us Next Article CEILING() Function in MySQL K Kanchan_Ray Follow Improve Article Tags : SQL DBMS-SQL mysql Similar Reads ASCII() Function in MySQL In this article, we are going to cover the ASCII function with examples and you will see the ASCII MYSQL query. And will also cover the ASCII code for the given character. Let's discuss one by one. ASCII function in MySQL is used to find the ASCII code of the leftmost character of a character expres 1 min read ELT() Function in MySQL In this article, we are going to cover ELT function with examples. In ELT function, number field will state that how many strings will be there. ELT function in MySQL is used to returns the string which is at index number specified in the argument list. In this function there is number field and str 1 min read FIELD() function in MySQL FIELD() : This function helps in returning the position of a value in the given value list. If the user passes string values as the argument of FIELD() function, then the search will be performed as string values. And, If the user passes numeric values as the argument of FIELD() function, then searc 2 min read COT() Function in MySQL COT() function : This function in MySQL is used to return the cotangent of a specified number. If the specified number is 0, an error or NULL will be returned. In a right triangle, the cotangent of an angle is the length of it's adjacent side divided by the length of the opposite side. Similarly, th 1 min read COUNT() Function in MySQL The COUNT() function in MySQL is a versatile aggregate function used to determine the number of rows or non-NULL values that match a specific condition in a query. It can be applied to an entire table or a particular column and is widely used in database operations to analyze the volume of data in a 3 min read DIV() Function in MySQL DIV() function : This function in MySQL is used to return a quotient (integer) value when integer division is done. For example, when 7 is divided by 3, then 2 will be returned. Syntax : SELECT x DIV y; Parameter : This method accepts two parameters as given below as follows. x - Specified dividend 1 min read AVG() Function in MySQL AVG() function : This function in MySQL is used to return the average value of the specified expression. Features : This function is used to find the average value of the specified expression.This function comes under Numeric Functions.This function accepts only one parameter namely expression.This 2 min read EXP() Function in MySQL EXP() function in MySQL is used to returns E raised to the power of a specified number. Here E(2.718281...) is the base of the natural logarithm. Syntax : EXP(X) Parameter : This method accepts one parameter as mentioned above in the syntax and described below : X â A specified number which will be 2 min read DEGREES() Function in MySQL DEGREES() function in MySQL is used to convert the radian values into degrees. The formula for converting radian to degree is : Ï radian = 180 degrees Syntax : DEGREES(X) Parameter : This method accepts only one parameter. X : The radian value which we convert to degrees. Returns : It returns equiva 2 min read CURTIME() function in MySQL CURTIME() function in MySQL is used to check the current time. It returns the current time as a value in âhh:mm:ssâ or 'hhmmss' format, depending on whether the function is used in a string or numeric context. Syntax : CURTIME(fsp) Parameters : This method accepts only one parameter. fsp - It specif 2 min read Like