Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2008
    Posts
    135

    Unanswered: How To get Hierarchal Data like cte in MSsql server

    How to get the hierarchal data from a table as parent- child relation ship?

    cte is there in mysql ?


    sample data

    id name parentid level
    1 test null null
    2 bklr null null
    3 testchild 1 1
    4 testchild1 3 2
    5 testchild2 1 1

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    there is no CTE in mysql

    perhaps this article can help... Categories and Subcategories
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •