Home > SQL Server > SQL Server Notes #1 – Boolean Operator Precedence

SQL Server Notes #1 – Boolean Operator Precedence

This shocked me a bit because I’ve never run into a problem with the evaluation of the boolean operators. I suspect this is because I make liberal use of parenthesis when I’m writing out SQL statements.  However boolean operators are evaluated in the following order : NOT, AND, OR.  As I said it’s not a huge problem to deal with, a few parenthesis will fix any issues that you might encounter, but it could create some interesting problems if you aren’t aware of it and the parenthesis keys on your keyboard is broken.

  1. No comments yet.
  1. No trackbacks yet.