No, there shouldn't be a difference. EXISTSdiscarded as soon as one matching line is detected. Therefore, he always preferred, for example, (select COUNT(*) from ...) > 0- a COUNTto make all the lines count.
If you create the following four queries:
select * from sys.objects
select top 1 * from sys.objects
select 1 where exists(select * from sys.objects)
select 1 where exists(select top 1 * from sys.objects)
And include execution plans, you will see that the second request creates an execution plan, which includes an operator TOP. The third and fourth queries give identical plans. TOPignored.
source
share