example, ROUND(99.999, 2)  returns 100.00 —the first argument is DECIMAL(5, 3) , and the return type is DECIMAL(5, 2) . 

If the second argument is negative, the return type has scale 0 and a corresponding precision; ROUND(99.999, -1)  returns 100 , which is DECIMAL(3, 0) . 

• SIGN( X ) 

Returns the sign of the argument as -1 , 0 , or 1 , depending on whether X  is negative, zero, or positive. 

mysql> SELECT SIGN(-32); -> -1 mysql> SELECT SIGN(0); -> 0 mysql> SELECT SIGN(234); -> 1 

• SIN( X ) 

Returns the sine of X , where X  is given in radians. 

mysql> SELECT SIN(PI()); -> 1.2246063538224e-16 mysql> SELECT ROUND(SIN(PI())); -> 0 

• SQRT( X ) 

Returns the square root of a nonnegative number X . 

mysql> SELECT SQRT(4); -> 2 mysql> SELECT SQRT(20); -> 4.4721359549996 mysql> SELECT SQRT(-16); -> NULL 

• TAN( X ) 

Returns the tangent of X , where X  is given in radians. 

mysql> SELECT TAN(PI()); -> -1.2246063538224e-16 mysql> SELECT TAN(PI()+1); -> 1.5574077246549 

• TRUNCATE( X , D ) 

Returns the number X , truncated to D  decimal places. If D  is 0 , the result has no decimal point or fractional part. D  can be negative to cause D  digits left of the decimal point of the value X  to become zero. 

mysql> SELECT TRUNCATE(1.223,1); -> 1.2 mysql> SELECT TRUNCATE(1.999,1); -> 1.9 mysql> SELECT TRUNCATE(1.999,0); -> 1 mysql> SELECT TRUNCATE(-1.999,1); -> -1.9 mysql> SELECT TRUNCATE(122,-2); -> 100 mysql> SELECT TRUNCATE(10.28*100,0); 

