--查询全部资源信息
sqlselect * from urm_class_info--向上遍历树,找到路径直到根节点,指定的是parentid
sqlselect distinct classid, parentid, name from urm_class_info start with parentid = 'cmdb0000000000000017' connect by prior parentid = classid--向上遍历树,找到路径直到根节点,指定的是classid,和下面的主要区别就是parentid和classid的位置
sqlselect classid, parentid, name from urm_class_info start with classid = 'cmdb0000000000000401' connect by prior parentid = classid--向下遍历整棵树,可以指定classid,来遍历指定节点的树
sqlselect classid, parentid, name from urm_class_info start with classid = 'cmdb0000000000000017' connect by prior classid = parentid--向下遍历整棵树,可以指定parentid,来遍历指定parentid节点的树,不包含parentid
sqlselect classid, parentid, name from urm_class_info start with parentid = 'cmdb0000000000000017' connect by prior classid = parentid
ORACLE中递归遍历
Code_Noting2024-05-28 23:55
相关推荐
小小码农Come on1 天前
Qt Creator + MSVC 2022 64bit 配置 Dump 文件生成与分析流程qiuyuyiyang1 天前
【MySQL】环境变量配置jgyzl1 天前
2026.3.11MyBatis-Plus基本使用与思考RDCJM1 天前
【MySQL】在MySQL中STR_TO_DATE()以及其他用于日期和时间的转换vanvivo1 天前
redis 使用加成BUFF1 天前
解决MySQL/MariaDB忘记root密码:完整重置教程(XAMPP/Windows版)杰克尼1 天前
苍穹外卖--day10dreamread1 天前
完美解决phpstudy安装后mysql无法启动小江的记录本1 天前
【SQL】多表关系与冷热数据(全维度知识体系)数据知道1 天前
MongoDB慢查询分析:详细讲述如何使用profile集合识别性能瓶颈