• Interesting.

    Can anyone explain exactly what the 3rd argument of Round() is for?

    The BOL says

    "function Is the type of operation to perform. function must be tinyint, smallint, or int. When function is omitted or has a value of 0 (default), numeric_expression is rounded. When a value other than 0 is specified, numeric_expression is truncated."

    which in practice seems to mean that 0 means round, any other value means truncate. So

    SET @Result = ROUND(5/3.0, 1, 2);

    SET @Result = ROUND(5/3.0, 1, 1);

    SET @Result = ROUND(5/3.0, 1, 999999999);

    SET @Result = ROUND(5/3.0, 1, -12345.6789);

    all do the same thing.

    So why not just make it a Bit datatype and call it 'Truncate' instead of 'Function'? Did it original behave differently?