Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Which sql statement is more efficient

$
0
0
There are two sql statement which do the same thing,
I wonder which is more efficient and why?

The two sql statement are as below:

1.
   select Sessionid from tableTest1
   where sessionid in
   (
      select sessionid from tableTest2
   )
2.
   select t1.Sessionid from tableTest1 t1,tableTest2 t2
   where t1.Sessionid = t2.Sessionid

Because tableTest1 and tableTest2 are huge, so i am very
care the efficient of SQL Statement.

Viewing all articles
Browse latest Browse all 23857

Trending Articles



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