P粉2698479972023-08-31 11:17:27
Another MySQL-specific alternative uses elt
select elt(col,'A','B','C','D','E','F',...);
P粉0557261462023-08-31 10:12:09
Add 64 to the integer and you get the ASCII value of the letter you want.
mysql> select CHAR(1+64); +------------+ | CHAR(1+64) | +------------+ | A | +------------+
Read https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_char