Click here to Skip to main content
11,803,495 members (75,525 online)
Click here to Skip to main content
Articles » Database » Database » General » Alternatives

Tagged as

SQL Server Recursive Fetch From Self Referencing Table

, 19 Nov 2009 CPOL 8.6K 6
CREATE PROC GetChildNodes (@ID uniqueidentifier)ASBEGINWITH PermissionList (PermissionID, PermissionName, Level)AS(SELECT ap.PermissionID, ap.PermissionName, 0 AS LevelFROM Permission AS apWHERE PermissionID = @IDUNION ALLSELECT ap.PermissionID, ap.PermissionName, Level + 1FROM


Members may post updates or alternatives to this current article in order to show different approaches or add new features.

No alternatives have been posted.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Anish M
Web Developer
India India
No Biography provided

| | Privacy | Terms of Use | Mobile
Web02 | 2.8.151002.1 | Last Updated 19 Nov 2009
Article Copyright 2009 by Anish M
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid