문제

I have a table T one of whose columns is pixels array<bigint>. How do I check that a number is its element?

When I try

select * from T where 12345 not in pixels;

I get

FAILED: ParseException line 9:24 missing ( at 'pixels' near '<EOF>'

it appears that one can use in only with literal arrays.

what do I do?

도움이 되었습니까?

해결책

The answer appears to be array_contains:

select * from T where not array_contains(pixels,cast(12345 as bigint));
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top