Guidelines for Building UNION Statements

Follow these guidelines when building UNION statements:

table3


table4

a
b
c
a
b
int
char(4)
char(4)
char(4)
float
---
-------
-------
-------
-------
1
abc
jkl
jkl
1.000
2
def
mno
mno
5.000
3
ghi
pqr




The following query:

SELECT a, b FROM table3
UNION 
SELECT b, a FROM table4

produces this results set:

a          b
--------   -----
1.000000   abc
2.000000   def
3.000000   ghi
1.000000   jkl
5.000000   mno