PostgreSQL/Math Functions/sqrt — различия между версиями

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

Текущая версия на 13:14, 26 мая 2010

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>