IN clause with PreparedStatement - Mailing list pgsql-jdbc

From Ingmar Lötzsch
Subject IN clause with PreparedStatement
Date
Msg-id 469E34E6.3010002@asci-systemhaus.de
Whole thread Raw
Responses Re: IN clause with PreparedStatement  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
Hello,

I want to submit a query like

SELECT *
FROM table1
WHERE id IN (1, 2, 3);

whereas the list 1, 2, 3 must be created dynamically. The goal is to
avoid n queries for single objects instead of one query. I can
concatenate the statement and use Statement. But I can't figure out, how
to use PreperedStatement. Can you help me?

Thank you, Ingmar


pgsql-jdbc by date:

Previous
From: "Kalle Hallivuori"
Date:
Subject: Re: Stream Copy for 8.1 - 8.3dev
Next
From: Tonio Caputo
Date:
Subject: Re: Index scan with like expressions