jussi jussi - 10 months ago 41
SQL Question

Search in integer array in Postgres

Is there any other way to search for a certain value in an

column in Postgres?

My currently installed Postgres version does not allow the following statement:

SELECT * FROM table WHERE values *= 10;

Array examples:


The statement should return every row where the array contains


For equality checks you can simply:

SELECT * FROM table WHERE 10 = ANY (values);

Read about ANY/SOME in the manual.