Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

Subquery efficiency question

$
0
0

My quick question is, what is the most efficient way to write this query?

select T1.Column1, T1.Column2, T2.Column3, T2.Column4, T2.Column5

from Table1 as T1

 join Table2 T2 on T1.Column1 = T2.Column1
 
where T1.Column1 in (select distinct Column1 from Table3)

This is how I solved my problem, but I want to know if it's technically correct. Thanks!


Viewing all articles
Browse latest Browse all 4871

Trending Articles



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