Go --创建函数(第一版) create function get_orderstr(@str varchar(8000)) returns varchar(8000) as begin set @str=rtrim(@str) declare @tb table(s varchar(1),a int) while len(@str)>0 begin insert into @tb select left(@str,1),ascii(left(@str,1)) set @str=right(@