create table a (id int ,name int);
create table b (id int ,name int);
select * from a
select * from b
insert into a
select 1,11 from dual
insert into b
select 1,22 from dual
变种一
update a set (a.id,a.name) = (select id ,name from b where a.id=b.id)
select * from a
变种二
update (select * from a where a.id=1) set (id,name)=(select id,name from b where b.id=1)
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11813230/viewspace-674122/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/11813230/viewspace-674122/