Skip to content
Advertisement

Tag: arrays

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

Fill Array from another column SQL

I need help whit my Code (PostgreSQL). I get in my row Result {{2.0,10}{2.0,10}} but I want {{2.0,10}{3.0,20}}. I don’t know where my error is. Result is text [ ] its must be a 2D Array This is Table1 Nummer Name Result 01 Kevin This is Table2 Nummer Exam ProfNr 01 2.0 10 01 3.0 20 My Code is Answer

Advertisement