PostgreSQL/Math Functions/sqrt

Материал из SQL эксперт
Перейти к: навигация, поиск

sqrt(x): Returns the square root of x

   <source lang="sql">

postgres=# postgres=# -- sqrt(x): Returns the square root of x postgres=# SELECT sqrt(2.0), sqrt(4.0), postgres-# sqrt(pow(2.0, 2)) AS inverse_example;

      sqrt        |       sqrt        |  inverse_example

+-------------------+--------------------
1.414213562373095 | 2.000000000000000 | 2.0000000000000000

(1 row) postgres=#

      </source>