0

Is it possible to create a calulated column using the values of json in postgresl ie -

I want to add longitude and latitude together as a new calculated column named total

SELECT id, location -> 'long' as long, location -> 'lat' as lat, (long + lat) as total
FROM users

All help appreciated Thanks

Zylo
  • 1
  • 1
  • Where is the json ? – Luuk Mar 28 '22 at 16:48
  • Does this answer your question? [Computed / calculated / virtual / derived columns in PostgreSQL](https://stackoverflow.com/questions/8250389/computed-calculated-virtual-derived-columns-in-postgresql) – Luuk Mar 28 '22 at 16:50

0 Answers0