SELECT -1 * 100 / 10
SELECT 100 * -1 / 10
differ in result. First returns -10
, second 0
.
Obviously it's caused by the order.
But I can't find any information that divisions have higher weighting than multiplications.
Looking at http://technet.microsoft.com/en-gb/library/ms190276%28v=sql.105%29.aspx multiplication and division are on the same level and reading on it's written
When two operators in an expression have the same operator precedence level, they are evaluated left to right based on their position in the expression.
Regarding this, the second query should be evaluated like this: 100 * -1 -> result / 10
, shouldn't it?