Skip to content
Advertisement

Tag: array-comparison

Compare two arrays in PostgreSQL

I have a table in postgres with a value column that contains string arrays. My objective is to find all arrays that contain any of the following strings: {‘cat’, ‘dog’} The following query uses ANY() to check if ‘dog’ is equal to any of the items in each array and will correctly return rows 1 and 3: I am trying

Advertisement