Presto: not support "in array"

Created on 27 Apr 2018  路  1Comment  路  Source: prestodb/presto

select id from table where id in array[1,2,3];

mismatched input 'in' expecting {<EOF>, 'AND', 'EXCEPT', 'GROUP', 'HAVING', 'INTERSECT', 'LIMIT', 'OR', 'ORDER', 'UNION'}

Most helpful comment

Hi, @UPEMPEROR.
You can rewrite a query with func contains.
https://prestodb.io/docs/current/functions/array.html

Select id from table where contains(ARRAY[1,2,3], id) ;

>All comments

Hi, @UPEMPEROR.
You can rewrite a query with func contains.
https://prestodb.io/docs/current/functions/array.html

Select id from table where contains(ARRAY[1,2,3], id) ;
Was this page helpful?
0 / 5 - 0 ratings