PROMPT SEQ_RPS_ID 表序列 DECLARE AN_FLAG NUMBER; BEGIN SELECT COUNT(1) INTO AN_FLAG FROM ALL_SEQUENCES WHERE SEQUENCE_NAME='SEQ_RPS_ID'; If AN_FLAG = 0 Then Execute IMMEDIATE 'CREATE SEQUENCE SEQ_RPS_ID INCREMENT BY 1 START WITH 1 MAXVALUE 999999999999999999999999999 MINVALUE 1 CACHE 20'; END IF; END; / COMMIT;原文链接:https://www.f2er.com/oracle/209628.html