In a H2 database, I'm trying to query an array column with ANY, something like that:
ALTER TABLE person ADD COLUMN tel_numbers VARCHAR ARRAY;
SELECT * FROM person p WHERE '+123456' = ANY(p.tel_numbers)
This throws an error 90054-210 invalid usage of aggregatte function
I also tryied adding additional parenthesis around p.tel_numbers
as for subquery, seeing the doc http://h2database.com/html/functions-aggregate.html#any but it does not help. How to write it correctly for H2? Hopefully a solution that also works in Postgres...
PS: The query is generated through Hibernate Query Builder, but that should not change the problem nor the answer.