Explaining certain functions in SQL
What do the MOD function and the ROUND function do in SQL?

Software/Hardware used:
ASKED: July 8, 2008  3:48 PM
UPDATED: July 8, 2008  6:38 PM

Answer Wiki:
The MOD function in T/SQL is actually the % which is the modulo operator. From Books OnLine: <pre>Returns the remainder of one number divided by another. SELECT 38 / 5 AS Integer, 38 % 5 AS Remainder ;</pre> The ROUND function takes a number with a decimal place and rounds it to the nearest while number. <pre>SELECT ROUND(123.9994, 3), ROUND(123.9995, 3)</pre>
Last Wiki Answer Submitted:  July 8, 2008  6:38 pm  by  Denny Cherry   64,520 pts.
All Answer Wiki Contributors:  Denny Cherry   64,520 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Check out my SQL Server blog “SQL Server with Mr Denny” for more SQL Server information.

 64,520 pts.