SQL> select * from q;
A
B ID
---------- ---------- ----------
1
2
1
2
3
2
3
4
3
SQL> select * from w;
A
B ID
---------- ---------- ----------
5
5
1
6
6
2
7
7
3
SQL> update q set (q.a,q.b)=(select w.a,w.b from w where q.id=w.id);
已更新3行。
SQL> select * from q;
A
B ID
---------- ---------- ----------
5
5
1
6
6
2
7
7
3
SQL> select * from w;
A
B ID
---------- ---------- ----------
5
5
1
6
6
2
7
7
3