1.生成0001-9999的编码//在PL/sql中创建一个序列Create sequence seq_cdptIncrement by 1 --自增数Start with 1 --开始累加数Maxvalue 999999 --最大数Minvalue 1 --最小开始数Nocycle --一直累加不循环nocacheselect substr('000'||seq_cdpt.nextval,-4) from dual