Posts Tagged ‘Recursive Query SQL’

We often need to deal with hierarchies (tree structures) in SQL. Some common examples are employee hierarchies, parent-child hierarchies etc.   There is a clean solution to achieve it using CTE (Common Table Expressions) which is demonstrated below with a simple example.   The diagram below represents a parent-child hierarchy:      And the table [...]



Follow

Get every new post delivered to your Inbox.