Finding a value in an array field

From: "Roberto (SmartBit)" <roberto(at)smartbit(dot)inf(dot)br>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Finding a value in an array field
Date: 2002-10-18 00:45:50
Message-ID: 001e01c2763f$b6efc7e0$1501a8c0@NoteBook
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

How can I know if a value is into an array field?

something like:

SELECT field1, field2 FROM myTableName
WHERE 10 in myArrayField

PS: I do NOT know then number of array elements!

tia

Roberto de Amorim - +55 48 346-2243
Software engineer at SmartBit Software
Delphi and Interbase consultant

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2002-10-18 01:43:50 Re: imploding/using arrays for IN (...)
Previous Message Martijn van Oosterhout 2002-10-17 23:19:35 Re: PostgreSQL query failed: COPY state must be terminated first