w3resource

PostgreSQL SQRT() function

SQRT() function

The PostgreSQL sqrt() function is used to return the square root of a given positive number.

Uses of SQRT() Function
  • Mathematical Calculations: To perform operations involving square roots in mathematical formulas.

  • Scientific Research: Employed in scientific research for calculations requiring the square root of values.

  • Engineering Applications: Useful in engineering for solving equations and modeling physical phenomena involving square roots.

  • Data Analysis: To compute square roots in data analysis tasks for statistical and mathematical modeling.

  • Financial Calculations: Utilized in financial models where square root calculations are necessary, such as in certain risk assessments and options pricing.

Syntax:

sqrt()

PostgreSQL Version: 9.3

Pictorial presentation of PostgreSQL SQRT() function

pictorial presentation of PostgreSQL SQRT() function

Example: PostgreSQL SQRT() function

Code:

SELECT SQRT(225) AS "Square Root";

Sample Output:

 Square Root
-------------
          15
(1 row)

Previous: SIN function
Next: TAN function



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://w3resource.com/PostgreSQL/sqrt-function.php