MySQL Forums
Forum List  »  Oracle

Does MySQL 5.0 support hierarchial queries?
Posted by: Mohan Rao
Date: October 18, 2006 12:54AM

Hello,

Can anyone please let me know whether MySQL 5.0 supports hierarchial queries? If so can you please give me a solution for this problem? Given below is the data:

empno name manager_id
123 mohan NULL
234 Jonn 123
345 Smith 123
456 Joe 567
567 Milan 123

It will be helpful if any one can give a query for this either in Oracle or MySQL5

I got the query in Oracle:

SELECT empno FROM table_name tbl CONNECT BY PRIOR tbl.empno = tbl.manager_id START WITH empno = "123"

Can anyone suggest the same query in MySQL 5.0?

Thanks in advance
Mohan.



Edited 2 time(s). Last edit at 10/18/2006 01:09AM by Mohan Rao.

Options: ReplyQuote


Subject
Views
Written By
Posted
6119
September 26, 2004 07:46AM
Does MySQL 5.0 support hierarchial queries?
4028
October 18, 2006 12:54AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.