andi_g69 posted:

WHERE
(category_id = @categoryID) or (@categoryID IS NULL)

My question is, would execution be slightly faster (really immeasurable actually) if it read:

WHERE
(@categoryID IS NULL) or
(category_id = @categoryID)

Because I know that with like C or PHP if you do an 'or' that if the first condition is met, it does not even check the second...is this M$'s T-SQL this intuitive?