How to show data Parent Child relation wise RRS feed

  • Question

  • I have a table say

    Test and structure like

    ID int

    ParentID Int identity type

    DisplayName Varchar(50)

    parent id store in ParentID in field.

    Now how to compose a sql which will show data in hierarchy wise

    first Parent then its child and if child has nested child then then will come.

    please give me a sample sql. thanks

    Wednesday, June 10, 2020 2:01 PM