Oracle开发常用函数 max 最大数 自动加 1 的模式

create sequence bs_com_seq increment by 1 start with 1 minvalue 1 maxvalue 999999 cycle nocache order;
select to_char(sysdate,'yyyymmdd')||lpad(bs_com_seq.nextval,6,'0') from dual

原文地址:https://www.cnblogs.com/yangpeng-jingjing/p/6898085.html