select
[raw] = 555.81,
[rounded] = round(555.81, 0),
[truncated] = round(555.81, 0, 1)
Result:
| raw | rounded | truncated |
|--------|---------|-----------|
| 555.81 | 556 | 555 |
SQL Fiddle: http://sqlfiddle.com/#!6/9eecb7db59d16c80417c72d1/5290
I believe it is rounding down. round(expression+0.5,0) Should work but I have not tested it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.