Ceil rounding up/go in and take the whole MySQL> SelectCeil (3.01);+------------+|Ceil (3.01)|+------------+| 4 |+------------+1Rowinch Set(0.40sec) #取舍一取整, rounding down MySQL> Select Floor(3.99);+-------------+| Floor(3.99)|+-------------+| 3 |+-------------+1Rowinch Set(0.00sec) #整数除法mysql> Select 3/4;+--------+| 3/4 |+--------+| 0.7500 |+--------+1Rowinch Set(0.00sec) #divmysql> Select 3Div4;+---------+| 3Div4 |+---------+| 0 |+---------+1Rowinch Set(0.00sec) #取模/take the remainder, all the same concept MySQL> Select 5.3MoD3;+-----------+| 5.3MoD3 |+-----------+| 2.3 |+-----------+1Rowinch Set(0.00sec) #Powerpower operation, 2 x 3-time MySQL> Select Power(2,3);+------------+| Power(2,3)|+------------+| 8 |+------------+1Rowinch Set(0.07sec) #四舍五入mysql> Select round(3.6523,2);//2 decimal places reserved+-----------------+| round(3.6523,2)|+-----------------+| 3.65 |+-----------------+1Rowinch Set(0.00sec) MySQL> Select round(3.6523,1);//1 decimal places reserved+-----------------+| round(3.6523,1)|+-----------------+| 3.7 |+-----------------+1Rowinch Set(0.00sec) #数字截取, just intercept numbers, use less MySQL> Select truncate(123.6523,2);+----------------------+| truncate(123.6523,2)|+----------------------+| 123.65 |+----------------------+1Rowinch Set(0.00sec) MySQL> Select truncate(123.652,1);+---------------------+| truncate(123.652,1)|+---------------------+| 123.6 |+---------------------+1Rowinch Set(0.00sec) MySQL> Select truncate(123.652,0);+---------------------+| truncate(123.652,0)|+---------------------+| 123 |+---------------------+1Rowinch Set(0.00Sec
numeric operators and functions