View Single Post

   
  #1 (permalink)  
Old 04-16-2008, 01:49 AM
=?ISO-8859-15?Q?Ingmar_L=F6tzsch?=
 
Posts: n/a
Default IN clause with PreparedStatement

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


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Reply With Quote