MathRound SQL Math Function

The MathRound() function takes three (3) arguments and returns a double-precision floating-point value to a specified number of fractional digits. The third parameter specifies how to round the value if it is midway between two numbers. The number value as first parameter is treated as double, the second parameter is integer between 0 and 15. The third is how to round it which is defined as 'ToEven' or 'AwayFromZero'

Syntax MathRound( Number Value , Decimal Positions , mode )

		/* Following will return 123.4 */ 
SELECT MathRound(123.45, 1 , 'ToEven');

/* Following will return 123.5 */
SELECT MathRound(123.45, 1 , 'AwayFromZero');

Get in touch with us
SqlDatabase.Net
Use the Contact us page
to send message


UseContactUsForm@sqldatabase.net

About

SQLDatabase.Net is a project which revolves around sql databases and computer programing languages.
This project is not sponsered by any third parties, all links and information is for reference purpose only.