Skip to content

Latest commit

 

History

History
35 lines (28 loc) · 470 Bytes

special-math-operators.md

File metadata and controls

35 lines (28 loc) · 470 Bytes

Special Math Operators

Postgres has all the mathematical operators you might expect in any programming language (e.g. +,-,*,/,%). It also has a few extras that you might not be expecting.

Factorial Operator:

> select 5!;
 ?column?
----------
      120
(1 row)

Square Root Operator:

> select |/81;
 ?column?
----------
        9
(1 row)

Absolute Value Operator:

> select @ -23.4;
 ?column?
----------
     23.4
(1 row)