I am using Oracle, I need to merge two queries, but i would like to add one column at the end showing where i set the value to “query2”, which mean it was a result coming from query2.
there is my example so far
select t1.* , t2.* , 0 isdefault
from table1 t1, table2 t2
where ....
union
select t1.*,t2.*, t3.isdefault
from table1 t1, table2 t2, table3 t3
where ...
and t3.inactive = 0;
Statically define the value, like you provided for the
isdefault: