Are boolean expressions in SQL WHERE clauses short-circuit evaluated ?
SELECT * FROM Table t WHERE @key IS NULL OR (@key IS NOT NULL AND @key = t.Key)
If @key IS NULL evaluates to true, is @key IS NOT NULL AND @key = t.Key evaluated?
If No, why not?
If Yes, is it guaranteed? Is it part of ANSI SQL or is it database specific?
If database specific, SqlServer? Oracle? MySQL?