阅读背景:

如何在SQL代码中遍历树/使用分层数据

来源:互联网 

Say I have an employee table, with a record for each employee in my company, and a column for supervisor (as seen below). I would like to prepare a report, which lists the names and title for each step in a supervision line. eg for dick robbins, 1d #15, i'd like a list of each supervisor in his "chain of command," all the way to the president, big cheese. I'd like to avoid using cursors, but if that's the only way to do this then that's ok.Say I have an employee table, with a record for




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: