Re: Using SELECT IN with prepared statement - Mailing list pgsql-jdbc

From Alexander Panzhin
Subject Re: Using SELECT IN with prepared statement
Date
Msg-id 49195C3C.8040606@gmail.com
Whole thread Raw
In response to Using SELECT IN with prepared statement  (Tiago Alves <talves@tapestry.pt>)
Responses Re: Using SELECT IN with prepared statement  (Ingmar Lötzsch <iloetzsch@asci-systemhaus.de>)
List pgsql-jdbc
Hi,

You need to write: select * from users where userid = ANY ?

See
http://www.postgresql.org/docs/8.3/interactive/functions-comparisons.html

Tiago Alves wrote:
> Greetings!
>
> Sorry if you answer this before, I couldn't find it.
>
> I want to do something like:
>
> PreparedStatement ps = connection.prepareStatement("select * from
> users where userid in ?");
> ps.setSomething(anIntArray);
>
> Is this possible? How?
>
> Thanks.
> Tiago A.
>


Attachment

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Pgsql jdbc driver 8.3 Build 603: Commit deadlock
Next
From: Ingmar Lötzsch
Date:
Subject: Re: Using SELECT IN with prepared statement