oracle创建序列
create table PROJ_ISMULTIBANK(
pid NUMBER(10) PRIMARY KEY auto,
projid NUMBER(10),
loanbankname VARCHAR2(250),
loanbankid VARCHAR2(300),
loanmoney float,
assureterm float,
assuretermtype VARCHAR2(4)
);
delete from PROJ_ISMULTIBANK where projid = xxx and pid not in ();
drop table PROJ_ISMULTIBANK;
CREATE SEQUENCE SEQ_PROJ_ISMULTIBANK_PID -- 建议使用表名+字段名+seq后缀
INCREMENT BY 1 -- 每次加几个
START WITH 1 -- 从1开始计数
NOMAXVALUE -- 不设置最大值
NOCYCLE -- 一直累加,不循环
NOCACHE -- 不建缓冲区
commit;
SELECT SEQ_PROJ_ISMULTIBANK_PID.NEXTVAL FROM dual;