求一个sql语句,查一个节点所有的祖先节点 select * from table where id in (select pid from table where id=50)不知是不是楼主要的 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 SQL> select * from t; ID PID---------- ---------- 20 10 30 20 40 30 50 40已用时间: 00: 00: 00.20SQL> select * from t start with id=50 connect by prior pid=id; ID PID---------- ---------- 50 40 40 30 30 20 20 10已用时间: 00: 00: 00.20SQL> select id fromselect t.*,level from t start with id=50 connect by prior pid=id)where level > 1 这样怎么导 求高手讲解一下此存储过程,小弟初学者。 System用户登陆的实例 动态SQL数组操作问题 我的imp脚本出错!请大家进来看看! SQL语句小问题 如何查看输出的变量? 如何禁止用户长时间查询一个表! 如何将双引号改成单引号 .NET下怎么连接Oracle? 关于在linux下定期自动备份ORACLE的问题? 如何实现rownum和order by 的问题???
---------- ----------
20 10
30 20
40 30
50 40已用时间: 00: 00: 00.20SQL> select * from t start with id=50 connect by prior pid=id; ID PID
---------- ----------
50 40
40 30
30 20
20 10已用时间: 00: 00: 00.20
SQL>
select t.*,level from t start with id=50 connect by prior pid=id
)
where level > 1