I have a Postgres table with the array field and with the following values:
I want to pull all the rows which have an id
value in the field
column and here is the query I tried (now simplified with table alias):
SELECT tb1."id",
tb1."field",
tb1."field1"
FROM "polls_nullableintegerarraymodel" tb1
WHERE tb1."field" IN (ARRAY[tb1."id"])
But for some reason it does not pull the values.