ASCII() Function in MySQL Last Updated : 08 Feb, 2024 Comments Improve Suggest changes Like Article Like Report 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 expression. Syntax : ASCII(str) Parameter : This method accepts one parameter as mentioned above in the syntax and described below in the example. str - A string whose ASCII value of the leftmost character is to be retrieved.Returns : It returns the ASCII code of the leftmost character. It also returns 0 If the string is empty and NULL if the string is NULL. Example-1 : ASCII() function to check the value for a lowercase character. SELECT ASCII('g')AS Lower_Case; Output : Lower_Case103Example-2 : ASCII() function to check the value for a uppercase character. SELECT ASCII('G')AS Upper_Case; Output : Upper_Case 71Example-3 : ASCII() function to check the value for a input string. SELECT ASCII('MySQL')AS String_Value; Output : String_Value77Example-4 : ASCII() function to check the value for every input string in a column under a table. Table -Student_Details Student_Id Student_Name101Tina102Rohit103Aman103SnehaSELECT ASCII(Student_Name) AS Ascii_Name FROM Student_Details ; Ascii_Name84826583 Comment More infoAdvertise with us Next Article ASCII() Function in MySQL J jana_sayantan Follow Improve Article Tags : SQL DBMS-SQL ASCII mysql Similar Reads CEILING() Function in MySQL 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 func 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 DAY() Function in MySQL DAY() function : This function in MySQL is used to return the day of the month for a specified date (a number from 1 to 31). This function equals the DAYOFMONTH() function. Syntax : DAY(date) Parameter : This method accepts a parameter which is illustrated below : date : Specified date to extract th 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 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 Like