永发信息网

oracle语句start with connect by prior 效率怎么样

答案:2  悬赏:0  手机版
解决时间 2021-01-23 06:24
  • 提问者网友:我一贱你就笑
  • 2021-01-22 19:04
oracle语句start with connect by prior 效率怎么样
最佳答案
  • 五星知识达人网友:有你哪都是故乡
  • 2021-01-22 19:21
查看当前用户的缺省表空间
SQL>select username,default_tablespace from user_users;
查看当前用户的角色
SQL>select * from user_role_privs;
查看当前用户的系统权限和表级权限
SQL>select * from user_sys_privs;
SQL>select * from user_tab_privs;
全部回答
  • 1楼网友:野慌
  • 2021-01-22 20:50
用 with .. as 实现递归。 供参考: oracle自己提供的是 connect by ... start with,而别的数据库只有使用with来实现 create tabletest1(id number, name varchar2(20), pid number); insert intotest1 values(1,'电器',null); insert intotest1 values(2,'家电',1); insert intotest1 values(3,'冰箱',2); insert intotest1 values(4,'洗衣机',2); insert intotest1 values(5,'电脑',1); insert intotest1 values(6,'笔记本',5); insert intotest1 values(7,'平板',5); insert intotest1 values(8,'组装机',7); insert intotest1 values(9,'品牌机',7); withsubqry(id,name,pid) as( select id,name,pid fromtest1 where id= 5 union all selecttest1.id,test1.name,test1.pid fromtest1,subqry wheretest1.pid = subqry.id ) select* fromsubqry; drop tabletest1;
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯