欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

获取最小可用id语句

程序员文章站 2022-06-12 16:30:19
...

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