• Operator precedence isn't just a programming or SQL server concept - it's a basic rule of mathematics. And no, multiplication doesn't occur before division or vice versa. The left-most operation is evaluated first. This is even clearly conveyed in the linked microsoft article.

    The reason you may get differences where division is used is not due to operator precedence - it's due to SQL server interpreting the numerator and denominator as integers and therefore defining the result to be an integer, truncating the fractional portion.

    The simpliest way to avoid this is to explicitly make either the numerator or denominator a decimal term, ie use / 100.0 instead of just / 100 or explicitly cast either as a decimal type. The result will then also be a decimal type. (Casting the result after the calculation has no effect.)

    However, in this particular case, the numerator would already be a decimal type by the time the division occurs - salary is a float so salary * 115 produces a decimal type. So this whole concept doesn't even apply to this example. Furthermore, the reason for not simply using salary * 1.15 eludes me.

    It may seem silly to harp on about a minor technicality, but getting such a basic concept wrong invalidates the credibility of the rest of the article. I'd advise a bit more fact checking and testing for next time.