bind variables usage
I am very keen on bind variables usage. Does anyone can refer me to the resourceful site to acquire this knowledge ? And Also in what condition the bind variable has its restriction or limition ?
Thanks for any impressive answer....
Excerpts from Tuning Docs..
Use bind variables rather than explicitly specified constants in your statements whenever possible.
For example, the following two statements cannot use the same shared area because they do not match character for character:
SELECT ename, empno FROM emp WHERE deptno = 10;
SELECT ename, empno FROM emp WHERE deptno = 20;
You can accomplish the goals of these statements by using the following statement that contains a bind variable, binding 10 for one occurrence of the statement and 20 for the other:
SELECT ename, empno FROM emp WHERE deptno = :department_no;
The two occurrences of the statement can then use the same shared SQL area.
Fore more info read PL/SQL User's Guide.
Oracle Certified Professional 8i, 9i.
"The degree of normality in a database is inversely proportional to that of its DBA"
Click Here to Expand Forum to Full Width