The following query shows that select * in combination with connect by and left join does not return all columns, but only the columns used in these conditions. This behavior was useful to me, given that select * should not be used in a release, it is useful to request data.
with t1 as ( select 1 id, 0 parent, 'ROOT' name from dual union all select 2 id, 1 parent, 'CHILD-1' name from dual union all select 3 id, 1 parent, 'CHILD-2' name from dual ), t2 as ( select 1 t1id, 'node' special from dual ) select * from t1 left join t2 on t2.t1id=t1.id start with id = 2 connect by prior parent = id;
while other queries return all columns
select * from t1 start with id = 2 connect by prior parent = id; select * from t1 left join t2 on t2.t1id=t1.id;
I could not find the documentation for this function, is there anything?
oracle left-join connect-by
Nahuel fouilleul
source share