Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hierarchy 1

Status
Not open for further replies.

CassidyHunt

IS-IT--Management
Jan 7, 2004
688
US
I am fairly new to mysql and more familiar with Oracle. I do not know if this is supported. I didn't find anything on google for this in mysql. I am trying to basically create a tree structure on the database. In Oracle the statement I would use would be:

Code:
select unique_id, parent_id, (lpad(' ',(level - 1)*3) || nodetext) as nodetext from table
start with parent_id is null
connect by prior unique_id = parent_id

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top