UPDATE BAS_ORGANIZATION_TYPE T1SET T1.PARENTID=(select rn from (SELECT id,rownum rn FROM BAS_ORGANIZATION_TYPE T2 )awhere a.id=t1.parentid);
update bas_organization_type set id=rownum;