Re: Using SELECT IN with prepared statement

From: Alexander Panzhin <jalexoids(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Using SELECT IN with prepared statement
Date: 2008-11-11 10:19:40
Message-ID: 49195C3C.8040606@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.
>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Shawn Chasse 2008-11-11 14:05:23 Re: Pgsql jdbc driver 8.3 Build 603: Commit deadlock
Previous Message Ingmar Lötzsch 2008-11-11 07:38:38 Re: Using SELECT IN with prepared statement