0% found this document useful (0 votes)
13 views2 pages

Task 6_math Functions in SQL

The document outlines various mathematical functions available in SQL, including ABS(), FLOOR(), CEILING(), SQUARE(), SQRT(), POWER(), RAND(), and ROUND(). Each function is briefly described, detailing its purpose and how it operates on numerical values. These functions are essential for performing mathematical operations and manipulations in SQL queries.

Uploaded by

praveenradiant7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views2 pages

Task 6_math Functions in SQL

The document outlines various mathematical functions available in SQL, including ABS(), FLOOR(), CEILING(), SQUARE(), SQRT(), POWER(), RAND(), and ROUND(). Each function is briefly described, detailing its purpose and how it operates on numerical values. These functions are essential for performing mathematical operations and manipulations in SQL queries.

Uploaded by

praveenradiant7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

MATH FUNCTIONS IN SQL

ABS() – Returns the non-negative value of a number – a positive number, removing any sign.

FLOOR() – Rounds a number downward to the closest integer less than or equal to it.

CEILING() – Rounds a number upward to the smallest integer greater than or equal to it.

SQUARE() – Outputs the result of multiplying a number by itself.

SQRT() – Gives the square root of the given number.

POWER(x, y) – Calculates x raised to the exponent y.

RAND() – Generates a random decimal value between 0 and 1.

ROUND(number, decimals, function) – Rounds a value to a defined number of decimal digits.

• number – The value that needs to be rounded.

• decimals – How many digits after the decimal point to keep (can be negative for rounding to
tens, hundreds, etc.).

• function –

0 or not given – Standard rounding (default).

1 – Cuts off the digits beyond the specified decimal without rounding (truncates).

You might also like