ANY for Array value check

From: Emi Lu <emilu(at)encs(dot)concordia(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Subject: ANY for Array value check
Date: 2011-06-10 15:10:21
Message-ID: 4DF233DD.8000104@encs.concordia.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Good morning,

String array compare command, I forgot how to do it.

E.g.,
create table z_drop(id varchar[]);
insert into z_drop values('{"a1", "a2", "b1", "b2", "b3"}');

I'd like to do:

select * from z_drop where id = any('a1', 'b1');

What is the command?

Thanks a lot!
Emi

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message C. Bensend 2011-06-11 04:28:04 Returning a set of dates
Previous Message Kevin Crain 2011-06-09 21:39:01 Re: need help with some aggregation magic