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

'IF EXISTS(SELECT COUNT(1))' VS 'IF EXISTS(SELECT 1) '

$
0
0

Hi,

I like to know which one from the below is better in performance when we check for the existence of rows.

IF EXISTS(SELECT COUNT(1) FROM myTable)

OR

IF EXISTS(SELECT 1 FROM myTable)

Please let me know the efficient way.



Thanks,
Ram
My Blog




Viewing all articles
Browse latest Browse all 23857

Trending Articles



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