首页 >数据库 >mysql教程 >获取最小可用id语句

获取最小可用id语句

WBOY
WBOY原创
2016-06-07 14:53:581234浏览

获取最小可用id语句 其中SELECT rownum id from dual connect by rownum=9 改成相应的最小值最大值区间,比如:www.2cto.com SELECT rownum+rpad(2010,7,0) id from dual connect by rownum=rpad(2010,7,9) Sql代码 select id from (SELECT rownum id from d


获取最小可用id语句

 

其中SELECT rownum id from dual connect by rownum

 

改成相应的最小值最大值区间,比如:www.2cto.com  

 

SELECT rownum+rpad('2010',7,'0') id from dual connect by rownum

 

Sql代码  

select id from (SELECT rownum id from dual connect by rownum (select id from tab where id= a.id)  

 

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn