sqlserver 2008 start with connect by 实现
程序员文章站
2022-03-25 22:58:59
...
with subqry(id,name,parent_id) as(
select id,name,parent_id from pro_type_manage where id in ('5799936','5799946') -- start with
union all
select test1.id,test1.name,test1.parent_id from pro_type_manage as test1,subqry
where test1.parent_id = subqry.id --connect by
)
select* from subqry;
select id,name,parent_id from pro_type_manage where id in ('5799936','5799946') -- start with
union all
select test1.id,test1.name,test1.parent_id from pro_type_manage as test1,subqry
where test1.parent_id = subqry.id --connect by
)
select* from subqry;
上一篇: 算法复杂度O(logn)详解
下一篇: python读写excel文件
推荐阅读
-
SQLServer 2008 CDC功能实现数据变更捕获脚本
-
SQLServer 2008 CDC实现数据变更捕获使用图文详解
-
SQLServer 2008 CDC功能实现数据变更捕获脚本
-
JAVA连接SQLSERVER2008实现教程
-
使用Sqlserver事务发布实现数据同步(sql2008)
-
SQLServer 2008 CDC实现数据变更捕获使用图文详解
-
SQLServer2008存储过程实现数据插入与更新
-
SQLServer2008导出EXCEL文件,然后使用SQL脚本发送邮件的实现
-
使用SQLServer 2008的CDC功能实现数据变更捕获
-
使用SQLServer 2008的CDC功能实现数据变更捕获