Syntax\n------\n\nORD(str)\n\nDescription\n-----------\n\nIf the leftmost character of the string str is a multi-byte character, returns the code for that character, calculated from the numeric values of its constituent bytes using this formula:\n\n``sql\n(1st byte code)\n+ (2nd byte code x 256)\n+ (3rd byte code x 256 x 256) ...\n`\n\nIf the leftmost character is not a multi-byte character, ORD()` returns the same value as the ASCII() function.\n\nExamples\n--------\n\nSELECT ORD('2');\n+----------+\n| ORD('2') |\n+----------+\n|       50 |\n+----------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/ord