From: | Zakkr <zakkr(at)zf(dot)jcu(dot)cz> |
---|---|
To: | Kevin Heflin <kheflin(at)shreve(dot)net> |
Cc: | "PGSQL-General (E-mail)" <pgsql-general(at)postgreSQL(dot)org> |
Subject: | Re: [GENERAL] questing using array |
Date: | 1999-10-13 10:06:39 |
Message-ID: | Pine.LNX.3.96.991013120250.19881A-100000@ara.zf.jcu.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 12 Oct 1999, Kevin Heflin wrote:
>
> Just trying to get a handle on how to work with an array as a datatype.
>
> For exampel I set up a table:
>
> name varchar (20),
> ageids int4[]
>
>
> Made an INSERT like:
>
> insert into TABLENAME (name, ageids) values ('test', '{1, 2, 3, 4}');
>
>
> What I haven't been able to figure out is how to do a select where one of
> the ageids = a particular number.
>
>
> I'd like to do something like
> select * from tablename where ( any ageids = 3 )
See the PostgreSQL contrib and array operators in this section.
Example *=, **= ..etc.
select * from tablename where ageids *= 3;
Zakkr
From | Date | Subject | |
---|---|---|---|
Next Message | Anders Mork | 1999-10-13 12:40:30 | AOlserver and Postgres |
Previous Message | Oliver Elphick | 1999-10-13 09:29:19 | Re: [GENERAL] How do I activate and change the postgres user's password? |