In MS SQL, numbers can be rounded using Round () function. For Example,
SELECT ROUND(178.49, 0)
The above query returns 178.00
SELECT ROUND(178.50, 0)
The above query returns 179.00.If the number after the decimal point is greater than 49 then it increments the number by 1.
SELECT ROUND(178.1234, 1)
The above query returns 178.1000.The first number after the decimal point is considered and rest of the numbers are neglected.
SELECT ROUND(178.1234, 2)
The above query returns 178.1200.The first two numbers after the decimal point are considered and rest of the numbers are neglected.
|
No responses found. Be the first to respond and make money from revenue sharing program.
|