表结构
id 信息ID
upid 父类ID数据
id upid
1 0
2 1
3 1
4 1
5 0
6 5
7 5
8 5
9 0
10 0想得到
id upid
2 1
3 1
4 1
6 5
7 5
8 5
9 0
10 0
这种结构,将ID被当做父类ID使用的数据过滤掉
请大大给个答案,非常感谢
id 信息ID
upid 父类ID数据
id upid
1 0
2 1
3 1
4 1
5 0
6 5
7 5
8 5
9 0
10 0想得到
id upid
2 1
3 1
4 1
6 5
7 5
8 5
9 0
10 0
这种结构,将ID被当做父类ID使用的数据过滤掉
请大大给个答案,非常感谢
解决方案 »
- sqlplus:command not found问题,知道的请进,谢谢了
- pl/json问题
- 一个function不知道什么问题
- 关于oracle enterprise manager和 grid control的问题
- oracle连接12514错误,但采用oracle的net manager测试连接成功?
- 请教如何在oracle实现ms sql的这个语法
- 如何配置ODBC
- 创建USERS 表空间的问题
- Oracle里有没有类似于SQL Server的JOB(作业)的东东
- 怎么说ORACEL 8.16 支持中文计算机名?????急得直冒汗!
- oracle访问问题
- 求ORA-01034 和ORA-27101解决办法
select t1.id,t1.upid,t2.id a from t t1,t t2
where t1.id=t2.upid(+)
)where a is null
order by id
select distinct * from tablename
where level <> 1
connect by prior id = upid
order by id;