I have a table
create table device_entity
(
id uuid not null primary key,
name varchar(255),
metadata hstore
);
This table has entries with 'country' = 'uk' in the metadata field.
This query returns all entries where the key 'country' is present in the metadata field.
SELECT * from device_entity where metadata ? 'country'
How can I select all entries where the key 'country' = 'uk'?
Asked by Alex Tbk
(127 rep)
Sep 17, 2022, 09:20 AM
Last activity: Sep 17, 2022, 10:47 AM
Last activity: Sep 17, 2022, 10:47 AM