Search in integer array in Postgres

前端 未结 3 1438
隐瞒了意图╮
隐瞒了意图╮ 2021-02-04 04:28

Is there any other way to search for a certain value in an integer[] column in Postgres?

My currently installed Postgres version does not allow the

3条回答
  •  南旧
    南旧 (楼主)
    2021-02-04 05:20

    For equality checks you can simply:

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

    Read about ANY/SOME in the manual.

提交回复
热议问题