PostgreSQL - JSON and JSONB
Identify the error in this query that tries to find rows where info JSONB column contains {"active": true}:
SELECT * FROM users WHERE info @> '{active: true}';Identify the error in this query that tries to find rows where info JSONB column contains {"active": true}:
SELECT * FROM users WHERE info @> '{active: true}';active should be "active".::jsonb cast, but the main syntax error is the missing quotes around the key.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions