发布网友
共1个回答
热心网友
你这个本来就是悖乱,无解。除非你在表里做标志或增加流水以及记录最大流水号
如:
lock table
select maxno into x from history
select max(cd) into y from B;
update history set maxno=y where maxno<y
MERGE INTO A ta
USING (select * from B where cd> x) tb
ON (ta.cd = tb.cd)
commit;