Tuesday 30 July 2019

Postgres - where clouse in Jsonb Column


Sample JSON of column

   [{
"address": "Veshu",
"location": "SVNIT",
},{
    "address": "Palanpur Patiya",
"location": "Ganesh Mandir",
}]


SELECT * FROM customer WHERE addresses @> '[{"address": "Veshu"}]'; 

No comments:

Post a Comment