Skip to content

SQRT

Return the square root of a number (any positive number, including integer, decimal, and double precision values).

SQRT(number)

Alternatively, you can use |/ number (no parentheses around number).

premdb=# SELECT SQRT(10);
      sqrt       
------------------
 3.16227766016838
(1 row)
premdb=# SELECT |/ 10;
    ?column?     
------------------
 3.16227766016838
(1 row)
premdb=# SELECT SQRT(seasonid) FROM season;
      sqrt       
------------------
               1
  1.4142135623731
 1.73205080756888
               2
 2.23606797749979
 2.44948974278318
 2.64575131106459
 2.82842712474619
               3
 3.16227766016838
...

Parent topic:Mathematical Functions