Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> How to turn this query to use BOUND variables?

How to turn this query to use BOUND variables?

From: Deja User <dejacom_at_my-deja.com>
Date: Tue, 09 Nov 1999 21:57:00 GMT
Message-ID: <80a5ba$j3f$1@nnrp1.deja.com>


I was reading a book on Oracle Performance Tuning. In there they suggest to use bind variables as much as possible to avoid having parse done of same query over and over again. There were many other benefits listed if Oracle could use a query that it has already parsed. A lot of queries are easy to modify to use bind variables. For example, select * from a_table where a_field >= :a_criteria

But what do you do in the case where you have a multiple values for the where clause. For example, how would you modify the following query to use the bind variables?
SELECT * FROM CUSTOMERS WHERE CUSTOMER_ID IN (1,2,3,4,5,6) etc etc. Any help would be greatly appreciated!

Regards,
Mike.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Nov 09 1999 - 15:57:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US