同意搂主的看法 就是select g_telephone from b where G_idcode = a.pd_idcard_no 返回多行了
加上max()限制返回行数,另外G_idcode <> ''是多余的,这个表达式永远为false,oracle中''和null是一样的概念: update a set a.pd_mobile_phone = (select max(g_telephone) from b where G_idcode = a.pd_idcard_no) where exists (select 1 from b where G_idcode is not null and G_idcode = a.pd_idcard_no )
返回多行了
update a
set a.pd_mobile_phone = (select max(g_telephone) from b where G_idcode = a.pd_idcard_no)
where exists (select 1 from b
where G_idcode is not null
and G_idcode = a.pd_idcard_no
)