Sandro Wiggers
Sandro Wiggers

Reputation: 4693

Is there inverse overlap (&&) to array in Postgresql?

I have two arrays in postgresql and I would like to discover if they DO NOT overlap.

I've tried to use NOT with the operator, no success.

array[1,2,3] NOT && array[4,5]

Any ideia would be appreciate.

Upvotes: 13

Views: 4859

Answers (1)

Sandro Wiggers
Sandro Wiggers

Reputation: 4693

Just another try and I got this working

SELECT NOT(ARRAY[1,2,3] && ARRAY[4,5])

Upvotes: 27

Related Questions