Ankit Agarwal

Ankit Agarwal

  • NA
  • 379
  • 253.4k

How to retrieve data from two tables merge in SQL server?

Jan 19 2018 6:50 AM
Hello,
 
I need two table:-
1. TableA

Id|Dimension|
1|abc
2|xyz
3|asd
4|fgh
5|opo

2. TableB

Id|TableAId1|TableAId2|TableAId3|TableAId4
1| 1 |2 |3 |4
2| 1 |5 |3 |4

result should be display:
TableBId|Dimension
1|abc
1|xyz
1|asd
1|fgh
2|abc
2|pop
2|asd
2|fgh

so how to write query for this in sql server?

Please help me.
Thanks in Advance.

Ankit Agarwal
Software Engineer 

Answers (1)