Home Return boolean if one element matches among 2 arrays in postgresql
Reply: 0

Return boolean if one element matches among 2 arrays in postgresql

user419
1#
user419 Published in May 27, 2018, 11:32 pm

I have 2 arrays in postgresql and I need to return true if there are at least 1 match of element between these 2 arrays no mather if it is same position.

Follows example below:

select array(select generate_series(0,10)) = 
       any(select array(select generate_series(10,11)))

it should return true because I have 10 in both arrays

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.306996 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO