ASCII Function in MSSQL and MySQL


The ASCII function returns the ASCII value of a passed character in both MySQL and MSSQL. If you pass more than one character, it returns the ASCII value of the leftmost character.

MySQL Example

mysql> SELECT ASCII('a');
------------
97

mysql> SELECT ASCII('android');
----------
97

ASCII Function in MySQL

MS SQL Server Example

SELECT ASCII('a');
------------
97

SELECT ASCII('android');
----------
97

ASCII Function Example in MSSQL

Another Example of MSSQL ASCII function

Back to Converting Functions from MSSQL to MySQL

The MSSQL to MySQL Converter will automatically convert MSSQL functions to their equivalent in MySQL while converting views.