判断重复: select count(1) from table a where rownum between 5000 and 7000 and exists ( select 1 from table b where rownum between 7000 and 10000 and a.c1=b.c1 ) 插入序列: update table set c_seq=rownum 然后加入序列,从max(c_seq)+1 开始
搞定了 select * from xyw a where exists (select 1 from xyw where yhm=a.yhm group by yhm having count(*)>1) order by yhm 散分
select count(1) from table a where rownum between 5000 and 7000
and exists (
select 1 from table b where rownum between 7000 and 10000
and a.c1=b.c1
)
插入序列:
update table set c_seq=rownum
然后加入序列,从max(c_seq)+1 开始
select * from xyw a where exists (select 1 from xyw where yhm=a.yhm group by yhm having count(*)>1) order by yhm
散分