on 12-12-2007 5:45 PM
Is it possible to use bind variables inside of a query template against an oracle database? I have queries that are executed from Business Logic Services many times and rather than having oracle parse the query everytime I would like to use oracle bind variables which will improve performance. If it is possible an example would be greatly appreciated.
Brett,
According to this site it is supported via the JDBC interface:
<a href="http://www.akadia.com/services/ora_bind_variables.html">http://www.akadia.com/services/ora_bind_variables.html</a>
Now to define a bind variable in a Fixed Query:
variable deptno number
exec :deptno := 10
select * from emp where deptno = :deptno;
This should work, please let me know.
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.