update id t1 set a=(select t2.a from ida t2 where t1.id=t2.id),b=(select t2.b from ida t2 where t1.id=t2.id),c=(select t2.c from ida t2 where t1.id=t2.id)
delete from id where id in (select id from ida); insert into id select * from ida;
还少一句条件 where t1.id=t2.id
delete from id where id in (select id from ida); insert into id select * from ida where id.id=ida.id;
update id set (a,b,c)=(select a,b,c from ida where ida.id=id.id);
或者 update id t1 set a=(select t2.a from ida t2 where t1.id=t2.id),b=(select t2.b from ida t2 where t1.id=t2.id),c=(select t2.c from ida t2 where t1.id=t2.id) where t1.id in(select t3.id from id t3,ida t4 where t3.id=t4.id)
update id t1 set a=(select t2.a from ida t2 where t1.id=t2.id),b=(select t2.b from ida t2 where t1.id=t2.id),c=(select t2.c from ida t2 where t1.id=t2.id) where exists (select * from id,ida where id.id=ida.id)
myxchy(阿呆) : 我的数据库是8.1.7,语句我已经验证过了,正确!
update a set a.a = b.a , a.b = b.b , a.c=b.c from id a , ida b where a.id = b.id
insert into id select * from ida;
where t1.id=t2.id
insert into id select * from ida where id.id=ida.id;
update id t1 set a=(select t2.a from ida t2 where t1.id=t2.id),b=(select t2.b from ida t2 where t1.id=t2.id),c=(select t2.c from ida t2 where t1.id=t2.id) where t1.id in(select t3.id from id t3,ida t4
where t3.id=t4.id)
我的数据库是8.1.7,语句我已经验证过了,正确!
black_dragon(半仙)的方法非常好
注意8i和9i的变化