Home >Database >Mysql Tutorial >SQL生成序列号

SQL生成序列号

WBOY
WBOYOriginal
2016-06-07 14:57:351499browse

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


利用函数 生成编号序列

id 位自增长序列

编号规则自定义
Oracle
select id,'Q'||to_char(sysdate,'yymmdd')||substr('00000',0,5-length(id))||id from sys_admin t order by id;
SQL生成序列号
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn