SQL Server 父子迭代查询语句,树状查询
摘要:-- Get childs by parent idWITH TreeAS( SELECT Id,ParentId FROM dbo.Node P WHERE P.Id = 21 -- parent id UNION ALL SELECT C.Id,C.ParentId FROM ...
阅读全文
posted @ 2013-01-14 14:16
posted @ 2013-01-14 14:16
posted @ 2013-01-07 14:17