Union query
Posted in 1998
Girish Kagrana — — source: Informix-list mailing list archive (1991-1998)
I have two queries as follows
query-1
-------
select tabid,"from_1st_select" from systables where tabid < 4
union
select tabid,"from_2nd_select" from systables where tabid < 4
query-1-output
--------------
tabid (constant)
1 from_1st_select
1 from_2nd_select
2 from_1st_select
2 from_2nd_select
3 from_1st_select
3 from_2nd_select
query-2
-------
select "from_1st_select" from systables where tabid < 4
union
select "from_2nd_select" from systables where tabid < 4
query-2-output
--------------
(constant)
from_1st_select
from_2nd_select
Question : the 1st query returns 6 rows, that is ok,
why 2nd query is returning 2 rows, why not 6 rows