Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> How to turn this query to use BOUND variables?
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