<p class="intro">利用函数生成编号序列 id位自增长序列 编号规则自定义 Oracle select id,'Q'||to_char(sysdate,'yymmdd')||substr('00000',0,5-length(id))||id from sys_admin t order by id;</p> <br>利用函数 生成编号序列<br><br>id 位自增长序列<br><br>编号规则自定义<br> Oracle <style> .CodeEntity .code_pieces ul.piece_anchor{width:25px;position:absolute;top:25px;left:-30px;z-index:1000;} .CodeEntity .code_pieces ul.piece_anchor li{width:25px;background: #efe;margin-bottom:2px;} .CodeEntity .code_pieces ul.piece_anchor li{border-left:3px #40AA63 solid;border-right:3px #efe solid;} .CodeEntity .code_pieces ul.piece_anchor li:hover{border-right:3px #40AA63 solid;border-left:3px #efe solid;} .CodeEntity .code_pieces ul.piece_anchor li a{color: #333;padding: 3px 10px;} .CodeEntity .code_pieces .jump_to_code{visibility:hidden;position:relative;} .CodeEntity .code_pieces .code_piece:hover .jump_to_code{visibility:visible;} .CodeEntity .code_pieces .code_piece:hover .jump_to_code a{text-decoration:none;} .CodeEntity .code_pieces h2 i{float:right;font-style:normal;font-weight:normal;} .CodeEntity .code_pieces h2 i a{font-size:9pt;background: #FFFFFF;color:#00A;padding: 2px 5px;text-decoration:none;} </style> <!--<ul class="piece_anchor">--> <!--<li>$velocityCount</li>--> <!--</ul>--> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush: sql; auto-links: false; ">select id,'Q'||to_char(sysdate,'yymmdd')||substr('00000',0,5-length(id))||id from sys_admin t order by id;</pre><div class="contentsignin">登录后复制</div></div> <img src="http://www.68idc.cn/help/uploads/allimg/151105/0P64VE1-0.png" alt="SQL生成序列号" >