How can I check if any of an array values in a single row is in my list?
Here is my table. Let's call it ABC
id | page_id | values
------------------+-------------+-------------------------------------------------------------------------
1376092679147519 | xyz | {6004036173148,6003373173651,6003050657850}
1375487155874738 | xyz | {6003301698460,6003232518610}
1497527026945449 | xyz | {6003654559478,6003197656807}
1375388575884596 | xyz | {6003512053894,6003450241842,6003051414416}
1319144441504401 | xyz | {6004001256506,6003514818642,6003400993421}
My aim is to select those rows, where one of the values appears in the given list ('6004036173148', '6003197656807').
SELECT id, page_id, values from ABC WHERE -SOME CLAUSE- IN ('6004036173148', '6003197656807');
id | page_id | values
------------------+-------------+-------------------------------------------------------------------------
1376092679147519 | xyz | {6004036173148,6003373173651,6003050657850}
1497527026945449 | xyz | {6003654559478,6003197656807}
Here is the structure of my PosgreSQL table
Table "public.ABC"
Column | Type | Modifiers
--------------------+--------------------------+------------------------
id | character varying | not null
page_id | character varying | not null
values | character varying[] |
Indexes:
"ABC_pkey" PRIMARY KEY, btree (id)
valuesas column name