ORD() FUNCTION in MySQL

ORD() FUNCTION
The MySQL ORD function is used to get the code for the specified string.

Syntax:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
ORD (string);
ORD (string);
ORD (string);

Parameters:
string: It is used to specify the string to evaluate.

Example:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
mysql> SELECT ORD (‘mysql’);
mysql> SELECT ORD (‘mysql’);
mysql> SELECT ORD (‘mysql’);

Output:

109

Explanation:
The result is the code of the specified string.