updatepassengersetbirthday=CONCAT(SUBSTR(cert_no,7,4),"-",SUBSTR(cert_no,11,2),"-",SUBSTR(cert_no,13,2))w...
update passenger set birthday=CONCAT(SUBSTR(cert_no,7,4),"-",SUBSTR(cert_no,11,2),"-",SUBSTR(cert_no,13,2)) where length(cert_no)=18
update passenger set SEX=1
where length(cert_no)=18 and SUBSTR(cert_no,17,1)%2=1
update passenger set SEX=0
where length(cert_no)=18 and SUBSTR(cert_no,17,1)%2=0
update passenger set birthtime = (select DATEDIFF(birthday,FROM_UNIXTIME(0))* 24 * 3600)
全文详见:http://xpxw.com/?id=144