Computing the modulus with FLOOR. : FLOOR « Math Functions « SQL Server / T-SQL Tutorial






4>
5>
6> SELECT 5-2*FLOOR(5/2)
7> GO

-----------
          1

(1 rows affected)
1>








11.10.FLOOR
11.10.1.FLOOR returns the value that represents the largest integer that is less-than or equal to the input_number.
11.10.2.Computing the modulus with FLOOR.
11.10.3.Returning the decimal portion using FLOOR.
11.10.4.select FLOOR(-1.25) (minus)
11.10.5.select FLOOR(1.25)
11.10.6.MIN(FLOOR(price)),
11.10.7.CASE with FLOOR function