What's the best to check if item exist or not: Select Count(ID)OR Exist(...)?

Viewed 7485

What's the best in performance to determined if an item exist or not specially if the table contain more than 700,000 row

if (Select count(id) from Registeration where email='email@w.cn') > 0
    print 'Exist'
else
    print 'Not Exist'

OR

if Exists(Select id from Registeration where email='email@w.cn') 
    print 'Exist'
else
    print 'Not Exist'
2 Answers
Related