Skip to content

Instantly share code, notes, and snippets.

@jaydson
Last active Jun 13, 2021
Embed
What would you like to do?
--PostgreSQL 13
SELECT *
FROM shirts
WHERE details->'attributes'->>'color' = 'neon yellow'
AND details->'attributes'->>'size' = 'medium';
--PostgreSQL 14
SELECT *
FROM shirts
WHERE details['attributes']['color'] = '"neon yellow"'
AND details['attributes']['size'] = '"medium"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment