知识库logo

删除interlib系统中无订购无验收无馆藏的书目数据

日期:2019-08-16

delete from biblios b where not exists(select  from holding where bookrecno=b.bookrecno) and not exists(select  from book_check where bookrecno=b.bookrecno) and not exists(select  from book_order where bookrecno=b.bookrecno) and not exists(select  from ser_check where bookrecno=b.bookrecno) and not exists(select * from ser_order where bookrecno=b.bookrecno);  ---如果数据量少可以一次性删除。

commit;

delete from biblios b where not exists(select  from holding where bookrecno=b.bookrecno) and not exists(select  from book_check where bookrecno=b.bookrecno) and not exists(select  from book_order where bookrecno=b.bookrecno) and not exists(select  from ser_check where bookrecno=b.bookrecno) and not exists(select * from ser_order where bookrecno=b.bookrecno) and rownum<10000;

commit; ---如果数据量大,10000条处理一次 循环处理。

其它相关知识

跳转到在线服务平台