하은양 믿음군 효실맘 호홍홍집s

oracle 2개 테이블 join 해서 update 하기 본문

가벼운 배움/Oracle

oracle 2개 테이블 join 해서 update 하기

호홍홍집 2016. 11. 25. 16:43

update gmt0030 g

set (biz_no, email) = 

  (select b.biz_no, b.email from biz_updata b where g.REPR_NM = b.REPR_NM and g.TEL_NO = b.TEL_NO and b.biz_no is not null and rownum <= 1)

where exists (

  select 1 from biz_updata b where g.REPR_NM = b.REPR_NM and g.TEL_NO = b.TEL_NO and b.biz_no is not null );