Click here to Skip to main content
15,867,308 members
Articles / Database Development / SQL Server

SQL code to traverse self-referencing tables with parent-child relationships

Rate me:
Please Sign up or sign in to vote.
4.60/5 (5 votes)
7 Jul 2009GPL31 min read 48.2K   26  
SQL code to traverse self-referencing tables with parent-child relationships. Recursive SQL written without special proprietary commands.

Alternatives

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.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Software Developer
Canada Canada
"And though I have the gift of prophecy, and understand all mysteries, and all knowledge; and though I have all faith, so that I could remove mountains, and have not charity, I am nothing. And though I bestow all my goods to feed the poor, and though I give my body to be burned, and have not charity, it profiteth me nothing. Charity suffereth long, and is kind; charity envieth not; charity vaunteth not itself, is not puffed up, Doth not behave itself unseemly, seeketh not her own, is not easily provoked, thinketh no evil; Rejoiceth not in iniquity, but rejoiceth in the truth; Beareth all things, believeth all things, hopeth all things, endureth all things."

Comments and Discussions