s = "dede323frf54de23" l = len(s) numbers = [] i = 0 while i < l: num = '' symbol = s[i] while '0' <= symbol <= '9': # symbol.isdigit() num += symbol i += 1 if i < l: symbol = s[i] else: break i += 1 if num != '': numbers.append(int(
)) ) BEGIN ; ) default ''; set v_length=CHAR_LENGTH(Varstring); DO )) )) ) THEN )); END IF; ; END WHILE; RETURN REVERSE(v_Tmp); END; 调用函数: select GetNum(字段) from table;-- GetNum中的字段名不需要用引号括起来