Tell me how to round the number in a big way? Does the sql function similar to the function from C# Math.Round(value, MidpointRounding.AwayFromZero);
Those. if I have 7.5 , I should get 8 , but if I have 7.4 , I should get 7 .
2 answers
select round (7.5, 0) from dual
- I tried your option, in Management Studio, it really works. But in Access, for some reason, this trick does not work. - Pyrejkee
- @ PyrejkeePureshkin specify in the tags to the question what kind of DBMS do you use. In Access, the
roundfunction performs banking rounding, about which I wrote in the comments. - teran - Well, take note. I thought the SQL language is unified. - Pyrejkee
|
In Access, you can do this:
SELECT round(x+0.05,0) |
0.5to the number before rounding. - Dmitry D.