SQL Server Mathematical Functions

SQL Server Mathematical Functions are:

Function Description Example
ABS It returns absolute value abs(-12.24) output: 12.24
ACOS Retruns the angle in radians of specified cosine float value ACOS(-0.89) Output: 2.6681414
ASIN Returns the angle in radians of specified sine float value ASIN(0.45) Output: 0.466765339047296
ATAN Returns the angle in radians of specified atan float value ATAN(0.45) Output: 0.422853926132941
CEILING It returns largest integer value greater than or equal to specified value. CEILING(1.45) Output:2
COS Retruns the trigonometric cosine of specified angle COS(0) Output: 1
COT Retruns the trigonometric cotangent of specified angle COT() Output: 0.617369623783555
FLOOR It returns smallest integer value greater than or equal to specified value. FLOOR(1.45) Output:1
EXP Used to get the exponential value of numeric value EXP(1) Output: 2.718281
LOG Used to get natural logarithm of specified numeric value LOG(24) Output: 3.17805383
POWER Used to get the power of specified value POWER(2,4) Output:16
RAND Used to get random value from o through 1 RAND() Output: 0.1245
ROUND Rounds a numbe to specfied number of decimal places ROUND(1.223454,3) Output: 1.223
SIN Retruns the trigonometric sine of specified angle SIN(45) Output:0.8509
SQRT Used to get square rooTtof given value SQRT(10) Output: 3.16227
SQUARE Used to get square of given value SQRT(10) Output: 100
TAN Used to get tanget of given value TAN(10) Output: 0.64836
Powered by k2schools