Handling Hierarchy Data in Database

后端 未结 6 1841
面向向阳花
面向向阳花 2021-02-03 14:05

I\'m curious to know what the best way (best practice) to handle hierarchies are in regards to database design. Here is a small example of how I usually handle them.

6条回答
  •  孤独总比滥情好
    2021-02-03 14:23

    In Oracle, you can use CONNECT BY/START WITH to query hierarchial data. In SQL Server, you can use a stored procedure, that calls itself recursively.

提交回复
热议问题