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.
Subject
Views
Written By
Posted
11520
August 26, 2004 03:30PM
6119
September 26, 2004 07:46AM
3968
May 12, 2005 05:24PM
3819
August 02, 2006 04:27AM
4455
February 02, 2005 12:44AM
5797
February 02, 2005 12:53AM
Does MySQL 5.0 support hierarchial queries?
4028
October 18, 2006 12:54AM
4306
October 23, 2006 02:12PM
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.