Home >Database >Mysql Tutorial >SQL生成序列号
利用函数生成编号序列 id位自增长序列 编号规则自定义 Oracle select id,'Q'||to_char(sysdate,'yymmdd')||substr('00000',0,5-length(id))||id from sys_admin t order by id;
select id,'Q'||to_char(sysdate,'yymmdd')||substr('00000',0,5-length(id))||id from sys_admin t order by id;