1
2
3
4
5
6
7 |
WHIT XXX(列1,列2....) AS
( SELECT
列1,列2... FROM
表 WHERE ID=xxxxxx UNION
ALL SELECT
列1,列2.... FROM
表 WHERE ID = XXX.ParentID ) SELECT 列1,列2.... FROM
XXX |
SQL Server 2005递归查询,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/briny/p/3755269.html