PostgreSQL - JSON and JSONB
Why does this query fail?
Assuming
SELECT data->>1 FROM table_name;Assuming
data is a JSON object, not an array.SELECT data->>1 FROM table_name;data is a JSON object, not an array.->>1 treats 1 as key, but JSON object keys must be strings, so this fails.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions