I have a table like this:
mTable
:
|id | text[] mVals |
|1 | {"a,b"} |
|2 | {"a"} |
|3 | {"b"} |
I'd like a query to return both rows {a,b},{b}
If I specify only b, but, it doesn't really return the row having atleast one of the specified values and only returns rows with the value specified.
SELECT mVals
FROM mTable
WHERE ARRAY['a'] && columnarray; -- Returns only {'a'}
SELECT mVals
FROM mTable
WHERE mVals && '{"a"}'; -- Returns only {'a'}
Nothing seems to be working as it should. What could be the issue?