发布网友 发布时间:2022-05-01 05:40
共2个回答
懂视网 时间:2022-05-01 10:01
set city_name=(select b.city_name from tmp_cust_city b where b.customer_id=a.customer_id)
where exists (select 1
from tmp_cust_city b
where b.customer_id=a.customer_id)
实例:
update bd_psndoc
set bd_psndoc.indutydate=(select begindate from (select a.pk_psnbasdoc as pk_psnbasdoc,
max(b.begindate) as begindate
from temp_psnbasdoc a left join hi_psndoc_deptchg b
on a.pk_psnbasdoc=b.pk_psnbasdoc and a.recordnum=b.recordnum
group by a.pk_psnbasdoc) tt where tt.pk_psnbasdoc=bd_psndoc.pk_psnbasdoc)
where exists(select 1 from (select a.pk_psnbasdoc as pk_psnbasdoc,
max(b.begindate) as begindate
from temp_psnbasdoc a left join hi_psndoc_deptchg b
on a.pk_psnbasdoc=b.pk_psnbasdoc and a.recordnum=b.recordnum
group by a.pk_psnbasdoc) tt where tt.pk_psnbasdoc=bd_psndoc.pk_psnbasdoc)
and pk_psncl=‘00015T100000000003M2‘ and indutydate is null
oracle中Update方法
标签:
热心网友 时间:2022-05-01 07:09
update [表名] set [姓名]='姓名',[性别]='性别' where [账号]='账号';