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

Retrieve matching data

$
0
0

I would like to know the query for the below mentioned case. I am using SQL Serever 2008.

Table1Table2
IDDepartmentNameZipIDDepartmentCountry
1axx101aqqq
2byy203cwww
3czz305ettt
4dcc40

I want to retrieve those data from table1 which found a match(Id+department) with Table2. The query would return the result as follows:

IDDepartmentNameZipCountry
1axx10qqq
3czz30www

Thanks.



Viewing all articles
Browse latest Browse all 8428

Trending Articles



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