Possible Duplicate:
Is the SQL WHERE clause short-circuit evaluated?
I have the following question regarding this query:
select * from sometable 
where 1=1 or (select count(*) from table2 > 0)
If the first condition is true (1=1), does SQL Server still do the inner select? 
Or does it stop when the first condition is true (like C)
 
     
     
     
     
    