創建存盤程序,重建sequence, 這個存盤程序發現,SEQ_2460H序列是洗掉了,但是沒有重建,是咋回事?
create or replace procedure RebuildSeqH as
n_count number(8);
v_code NUMBER;
v_errm VARCHAR2(64);
begin
select count(1)
into n_count
from user_sequences t
where t.sequence_name = 'SEQ_2460H';
if n_count > 0 then
execute immediate 'drop sequence ' || 'SEQ_2460H';
end if;
execute immediate 'create sequence ' || 'SEQ_2460H' || ' minvalue 1 maxvalue 999 start with 1 increment by 1 NOCYCLE cache 20';
exception
when others then
v_code := SQLCODE;
v_errm := SUBSTR(SQLERRM, 1, 64);
DBMS_OUTPUT.PUT_LINE('' || v_code || ':' ||
v_errm);
end;
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/211346.html
標籤:基礎和管理
上一篇:玩轉python?一文總結Python入門到進階的竅門和技巧!(建議收藏)
下一篇:標簽復制
