1

I have an Employees table. I am using Oracle database.

 Employees Table
 - Employee_id
 - first_name
 - last_name
 - manager_id
 - email_id

How can I query all the employees under another employee ?

Thanks.

4

1 回答 1

2

Oracle 有一个CONNECT BY语法...

    SELECT *
      FROM employees
START WITH employee_id = 123
CONNECT BY PRIOR employee_id = manager_id
于 2012-08-03T10:01:53.747 回答