在oracle数据库中,有一张表A,其中主键为ID,由00001开始排序,现在排序到06000.
我想知道由00001至06000间存在的断号。
求一连号查断号sql语句,谢谢各位了!
我想知道由00001至06000间存在的断号。
求一连号查断号sql语句,谢谢各位了!
解决方案 »
- 安装oracle 出现这种问题怎么办,,急,急
- oracle中 仅可以为插入 LONG 列的 LONG 值赋值 的问题!
- C语言访问oracle数据库的问题目
- 我在proc中使用了UNION语句,当其中一个SELECT未查出结果时,sqlcode返回SQL_EOS.
- 高难度问题!
- 我建立了一个用户,可是用它登陆OEM时,不能登陆!!
- 20分!请问各位高手,sqlldr如何去掉文本文件中的空格;急!!!!谢了!
- 求救:ManagementServer服务无法启动
- select语句连接access数据库正常 但连接oracle数据库出错
- 怎么去掉口令
- ORECLE 高难度 合并
- 列出有两门(含)以上不及格课程的学生名单及其平均成绩
from (select id ,lead(id) over(order by id) as nextId)
where nextId-id>1
select a.al,b.id
from (
select lpad(level,4,'0') al
from dual
connect by level <= 10) a,tab_1 b
where a.al = b.id(+)
and b.id is null
order by a.al;
---用这个...
select id from tab start with to_number(id) = 1 connect by to_number(id)<=6000
如果要查其中断了哪些号
select id
from(
select rownum id from dual connect by rownum<=(select to_number(max(id)) from TABLE1))t
where not exists(
select 1 from TABLE1 where id=to_char(t.id,'fm00000'))