set @word = 'hello';
with recursive cte as (
select @word as word, left(@word, 1) as val, 1 as idx
union all
select word, substring(word, idx + 1, 1), idx + 1
from cte
where idx < char_length(word)
)
select group_concat(ascii(val) + @add order by idx separator '') ascii_word from cte
1条答案
按热度按时间ffvjumwh1#
只需在内部进行计算
group_concat()
: