Home >Database >Mysql Tutorial >获取最小可用id语句

获取最小可用id语句

WBOY
WBOYOriginal
2016-06-07 14:53:581234browse

获取最小可用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)  

 

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