Breaking News

Editors Picks

Wednesday, December 7, 2011

update with join in oracle

1)
UPDATE target_table t SET t_col1 = ( SELECT s_col1 FROM source_table s  WHERE t.target_id = s.source_id );

2)
update
(
   select t_col1,t_col2,t_col3,s_col1,s_col2,s_col3  from   target_table t  ,source_table s   where  t.target_id = s.source_id
)
set t_col1 = s_col1 ,t_col2 = s_col2  ,t_col3 = s_col3;
Read more ...

Contact Us

Name

Email *

Message *