随笔分类 - oracle
摘要:--建立自增序列create sequence seqidNOMAXvaluestart with 1increment by 1nocacheorder;--建立触发器create or replace trigger tri_test_id before insert on mytable --mytable为要插入自增序列的表 for each rowdeclare nextid number;begin IF :new.Id IS NULL or :new.Id=0 THEN --id是要插入自增序列的列名 select seqid.nextval int...
阅读全文
摘要:用数据说话:同样的环境下测试4次//省时分页select * from(select a.*,rownum rn from (select * from cfma_dms_report) a where rownum<40) where rn>20 耗时:22.4 27.3 22.0 23.2//耗时分select * from(select a.*,rownum rn from (select * from cfma_dms_report) a ) where rn between 20 and 40 耗时: 36.09 27.25 28.3 32.1
阅读全文
浙公网安备 33010602011771号