SQL ASCII function is used to return ASCII code of a character, if the parameter is a string, it will return the ASCII code of the most left character.

SQL ASCII Function Syntax


SQL ASCII Function Example

SELECT ASCII('S') -- Value: 83

SELECT ASCII('Q') -- Value: 81

SELECT ASCII('L') -- Value: 76

SELECT ASCII('-') -- Value: 45

SELECT ASCII('Statements') -- Value: 83

Leave a Comment