Online Sahu

Online Sahu

  • NA
  • 3
  • 622

how fast the joins will work in subquery|sql server?

Nov 11 2017 2:31 AM
Select col1 from A where A.col1 in(Select distinct col1 from B where col1 is not null)
Select A.col1 from A inner join (select distinct col1 from B where col1 is not null) B on A.col1 = B.col1
Which is the more efficient one?and why?
 
Answer:
Joins are working fast when compared with the Subquery in any SQL Query. In Subquery main query is in waiting state until the completion of inner query but in Joins it is different.
 
For more Details Visit: https://tekslate.com/msbi-training/
 
 
 

Answers (2)