SQL> create table test01
  2  (
  3    col1 varchar2(10),
  4    col2 number,
  5    col3 varchar2(10)
  6  )
  7  ;Table createdSQL> create table test02
  2  (
  3    col1 varchar2(10),
  4    col2 varchar2(10)
  5  )
  6  ;Table createdSQL> insert into test01 values('a',1,'');1 row insertedSQL> insert into test01 values('a',2,'');1 row insertedSQL> insert into test01 values('a',3,'');1 row insertedSQL> insert into test01 values('b',1,'');1 row insertedSQL> insert into test01 values('b',2,'');1 row insertedSQL> commit;Commit completeSQL> insert into test02 values(a,'aa');insert into test02 values(a,'aa')ORA-00984: 列在此处不允许SQL> insert into test02 values('a','aa');1 row insertedSQL> insert into test02 values('b','bb');1 row insertedSQL> commit;Commit completeSQL> select * from test01;COL1             COL2 COL3
---------- ---------- ----------
a                   1 
a                   2 
a                   3 
b                   1 
b                   2 SQL> select * from test02;COL1       COL2
---------- ----------
a          aa
b          bbSQL> 
SQL> UPDATE TEST01 T
  2     SET COL3 = (SELECT COL2 FROM TEST02 P WHERE T.COL1 = P.COL1)
  3   WHERE col1||COL2 IN (SELECT col1||MAX(COL2) FROM TEST01 GROUP BY COL1)
  4  /2 rows updatedSQL> commit;Commit completeSQL> select * from test01;COL1             COL2 COL3
---------- ---------- ----------
a                   1 
a                   2 
a                   3 aa
b                   1 
b                   2 bbSQL>