3个回答
展开全部
可以通过序列,自动生成流水号
一
SQL> create sequence seq_test increment by 1 start with 100000 maxvalue 99999999;
Sequence created.
二
SQL> select to_char(sysdate,'yy')||'01'||seq_test.nextval from dual;
TO_CHAR(SYSDATE,'YY')||'01'||SEQ_TEST.NEXTVAL
--------------------------------------------------------------------------------
1501100001
一
SQL> create sequence seq_test increment by 1 start with 100000 maxvalue 99999999;
Sequence created.
二
SQL> select to_char(sysdate,'yy')||'01'||seq_test.nextval from dual;
TO_CHAR(SYSDATE,'YY')||'01'||SEQ_TEST.NEXTVAL
--------------------------------------------------------------------------------
1501100001
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询