DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: bind variables usage

  1. #1
    Join Date
    Oct 2000
    Posts
    250

    bind variables usage

    Hi everyone,
    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....

  2. #2
    Join Date
    Feb 2000
    Location
    Singapore
    Posts
    1,758
    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.
    http://download-west.oracle.com/docs...a96624/toc.htm
    Sanjay G.
    Oracle Certified Professional 8i, 9i.

    "The degree of normality in a database is inversely proportional to that of its DBA"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width