1.update数据
UPDATE VOL_BASEINFO b SET (b.vlbi_zzmmm, b.vlbi_mzm) = (select t.zz,t.mz from MY_ZHB_2014 t where t.xh= b.vlbi_xh) where b.vlbi_xh like ‘14%‘;
2.根据身份证号判断男女
decode(mod(to_number(substr(‘身份证号‘, 17, 1)), 2), 0, ‘2‘, ‘1‘)a.先截取身份证的倒数第二位数字b.被2整除c.如果余数是0,则为2-女d.如果余数是不为0,则为1-男
select decode(mod(to_number(substr(‘身份证号‘, 17, 1)), 2), 0, ‘2‘, ‘1‘) from dual
时间: 2024-11-05 20:24:08