T-SQL:CTE实现递归
摘要: USE AdventureWorks ;GOWITH DirectReports(LoginID, ManagerID, EmployeeID) AS ( SELECT LoginID, ManagerID, EmployeeID FROM HumanResources.Employee WHERE ManagerID IS NULL UNION ALL SELECT e.LoginID, e.M...
阅读全文
posted @
2009-12-10 14:29 闫力昕 阅读(97) |
评论 (0) 编辑