oracle - Fetch all parents and children with "connect by" query for a particular input in sql -


i have table com_customer_mst, contains customer_id , parent_customer_id, need fetch parents , children particular customer_id input. 1 customer_id have single parent have multiple children.

i have run query:

select customer_id, customer_code, parent_customer_id sbsa_axia.com_customer_mst start customer_id = 154   connect prior customer_id = parent_customer_id; 

but giving children.

customer_id     parent_customer_id 61              12 18              12 111             12 250             12 14              15 


Comments

Popular posts from this blog

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -