hello all i've a table named last_id which stores max codes of diffient groups the ddl statement is----create table last_id (group_id varchar2(4),MAX_COde varchar2(12)); sample output of last_id is Group_id MAX_COde -------- ----------- 0001 042000100290 0003 042000300244 0004 042000400181 0007 042000700176 0010 042001000291 0011 042001100676 0012 042001200259 0013 042001300353 0014 042001400268 i've another table named last_id2 with same structure butcontains different values the ddl statement is----create table last_id2 (group_id varchar2(4),MAX_COde varchar2(12)); sample output of last_id2 is Group_id MAX_COde -------- ----------- 0001 042000100001 0001 042000100002 0003 042000300001 0003 042000300002 0004 042000400001 0007 042000700001 0010 042001000001 0010 042001000002 now i want an sql or pl/sql to update MAX_COde values in last_id2 table to reflect the following output Group_id MAX_COde -------- ----------- 0001 042000100291 0001 042000100292 0003 042000300245 0003 042000300246 0004 042000400182 0007 042000700177 0010 042001000292 0010 042001000293 regards papu