输入banner图图片脚本导航/分类

sql-ROUNT函数

 

语句:

SELECT name, ROUND(gdp/population, 0) FROM world

结果:

China  6122

 

语句:

SELECT name, ROUND(gdp/population, 4) FROM world

结果:

China  6121.7106

 

 

语句:

 

SELECT name, ROUND(gdp/population, -2) FROM world

 

结果:

 

China  6100

 

解释:

负数的意思是往小数点左边数两位,四舍五入后,去除拿o补上

sql-ROUNT函数

标签:round   字段   bsp   去除   span   返回   意思   str   小数