Cast char as integer : Cast « Data Type « PostgreSQL






Cast char as integer


postgres=#
postgres=#
postgres=# SELECT 1 + CAST('1' || '2' AS integer) AS add_on_to_twelve;
 add_on_to_twelve
------------------
               13
(1 row)

postgres=#
           
       








Related examples in the same category

1.round(4.0, 4)
2.round(CAST (4 AS numeric), 4)
3.SELECT 1 + ('1' || '2')::integer