recycled
Mr or Mrs. 500
Points: 579
More actions
October 20, 2003 at 3:33 pm
#176805
Is it possible to have a SQL Statement which selects data from each of two different tables and performs a UNION with the results?
E.g. Select c1, c2, c3 from TableA
UNION
Select c1, c4, c5 from TableB?
bp
SSCarpal Tunnel
Points: 4656
October 20, 2003 at 10:27 pm
#478888
Yes. According to Books-On-Line (BOL)
<quote>
Two basic rules for combining the result sets of two queries with UNION are:
1) The number and the order of the columns must be identical in all queries.
2) The data types must be compatible.
</quote>
HTH
Billy
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply