

update sb_person_grade set makeUp=0;

update `security_certificate` t1,sb_personcertificate t2
set t1.userid = t2.userid,
t1.companyName = t2.companyName,
t1.nation = t2.nation,
t1.companyId = t2.companyid,
t1.sex = t2.Sex,
t1.phone = t2.phone,
t1.trainId = t2.trainOrgID,
t1.trainName = t2.trainOrgName,
t1.personId = t2.personid,
t1.areaCode = t2.district,
t1.orgId = t2.orgid,
t1.populationAddress = t2.populationAddress
WHERE t1.securitypersonid = t2.id
and t1.active=true and t2.active=TRUE;
