Mega Code Archive

 
Categories / PostgreSQL / String Functions
 

Get negation

postgres=# SELECT ~ CAST('20' AS int8) AS "negation";  negation ----------       -21 (1 row) postgres=#