Use pi() in calculation : PI « Math Functions « PostgreSQL






Use pi() in calculation

postgres=#
postgres=# SELECT 2 + 2 AS "2 plus 2", pi() AS "the pi function", 'PostgreSQL is more than a calculator!' AS comments;
 2 plus 2 | the pi function  |               comments
----------+------------------+---------------------------------------
        4 | 3.14159265358979 | PostgreSQL is more than a calculator!
(1 row)

postgres=#
postgres=#

           
       








Related examples in the same category

1.pi(): Returns the pi constant (3.14159...)
2.pi() constant