Skip to content

Is it possible that IN queries will work with arrays ? #12197

Answered by proddata
sayalit95 asked this question in General
Discussion options

You must be logged in to vote

Can you try with UNNEST?

department.id = ANY(SELECT UNNEST(ids) FROM (t1, t2))

 string_to_array(string_agg(concat(t1.id,',',t2.id),','),',') :: array(bigint)

could be rewritten as

array_agg(concat(t1.id,',',t2.id)) :: array(bigint)

or could it not?

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@sayalit95
Comment options

@proddata
Comment options

@sayalit95
Comment options

Answer selected by sayalit95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants