Home > Database > Mysql Tutorial > body text

SQL生成序列号

WBOY
Release: 2016-06-07 14:57:35
Original
1471 people have browsed it

利用函数生成编号序列 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;
Copy after login
SQL生成序列号
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template