SQL SERVER-树状结构表设计

增加ParentID字段,可以查到上级

select * from table where ParentID=我的Id,则可以查到下级

你可能感兴趣的:(SQL,Server)