Home >Database >Mysql Tutorial >mysql floor()函数向下取整使用实例

mysql floor()函数向下取整使用实例

WBOY
WBOYOriginal
2016-06-01 09:56:581569browse

多的不解释,请大家看下面实例:

实例1:大于0的数使用floor()函数

<code class="language-sql">SELECT FLOOR(5.1)</code>

结果为:5

 

实例2:小于0的数使用floor()函数

<code class="language-sql">SELECT FLOOR( - 5.1 )</code>

结果:-6

 

看了上面两个实例,我相信大家应该知道mysql floor()函数的使用方法了。

更多阅读:

mysql向上取整

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn