#民族 update nation set `name`=REPLACE(`name`,'\r\n',''); delete from sys_dict where codeType='nation'; insert into sys_dict(isActive,codeType,description,seq,codeValue,label) SELECT true,'nation','民族',@rownum := @rownum+1 AS rownum,nation.`code`,nation.`name` FROM (SELECT @rownum:=0) r,nation; update sys_dict set label=REPLACE(label,'\r\n','') where codeType='nation'; update sb_personcertificate set Nation=CONCAT('0',Nation) where active=true and Nation is not null and LENGTH(Nation)=1;