How to round down to nearest integer in MySQL?

前端 未结 7 1187
自闭症患者
自闭症患者 2020-12-24 04:26

How would I round down to the nearest integer in MySQL?

Example: 12345.7344 rounds to 12345

mysql\'s round() function rounds up.

相关标签:
7条回答
  • 2020-12-24 05:10
    SELECT FLOOR(12345.7344);
    

    Read more here.

    0 讨论(0)
提交回复
热议问题