Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

Join query for two tables

$
0
0
hi

i am having to table 1st one city_master and 2nd Transaction

City_Master

id    City
1     Nagpur
2     Mumbai
3     Pune

Transcation

id   Supplier_name   Product    Qty    City     Alt_City
1    Nikhil                   Iron         100     1       2
2    Amit                     Copper    100     1       3
3    Rohit                    Steel       100     3       1

i want query output like below

1    Nikhil          Iron        100     Nagpur       Mumbai
2    Amit           Copper    100     Nagpur       Pune
3    Rohit          Steel       100     Pune         Nagpur

Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>