So, I am doing union on same table, table1 with 2 different set of queries. My first query should return results with type ‘test’ and 2nd query should return results irrespective of type. But when Iam executing below query my first query results is not coming on top. Is there any way to achieve that such that it should always show first query execution results on top?
select * from table1 where tl='AAA' AND FT ='ABC' AND DATE='04-MAY-23 11:07:00' AND TYPE = 'TEST'
UNION
select * from table1 where tl='AAA' AND FT ='ABC' AND DATE='04-MAY-23 11:07:00'
2
Answers
This was giving me expected results. Thanks @Thorsten Kettner
Hope below query can help, we can set a order by value to fixed_number field and can do order by with that fixed_number field