Last active
June 13, 2021 18:51
-
-
Save jaydson/8c82e98f4c365cf83feec8f0fdd2a840 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--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