I am using a number as alias in select query in PostgreSQL
Select json->>'1' as 1 from myTable
It shows an error
"error in query near 1".
It works fine if we dont use number (eg. json->>'1' as data )
Double quotes for identifiers:
Select json->>'1' as "1"
from myTable
https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With