0

hi all,

Table 1:

ID | COL1
1 | 1
1 | 13
1 | 64

Table 2:

ID | COL1
1 | 14
1 | 13


Output needed:

ID | COl

1 | 1
1 | 13
1 | 14
1 | 64

How will i accomplish this???

Thanks and regards
Bhakti

3
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by bhakti.thakkar
3
select a.id, a.colname, b.colname from Table1 a join Table2 a on (a.id=b.id) where a.id = '1' order by a.id asc
Votes + Comments
thanks
1

hi, you need to use union

SELECT ID, COL1 FROM Table1
UNION
SELECT ID, COL1 FROM Table2

0

hi, you need to use union

SELECT ID, COL1 FROM Table1
UNION
SELECT ID, COL1 FROM Table2

hi,
thanks for your help. UNION Clause helped me to get the desired result

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.