• One easy way to make sure short circuiting works the way you want it is using case statements:

    select

    *

    from

    Person

    where

    1 = 1

    and CreateDateTime > getdate() - 30

    and case

    when Age > 90 then 1

    when Age < 5 then 0

    when Gender = 'Male' then 1

    when LastName like 'SAM%' then 1

    else 0

    end = 1

    This gets records for all people over the age of 90, males of age 5 or more and anyone with a last name that starts with the letters SAM. Notice that the integer checks are done first as they are the easiest to evaluate and the expensive like expression is last. The documentation for the case statement explicity says:

    Evaluates, in the order specified, Boolean_expression for each WHEN clause.

    so this is like an explicit short circuit if you would like.