Answered Questions

  • Procedure Parameters

    What is call by value and call by reference in parameters (IN, OUT, INOUT)?

    Star Read Best Answer

    Editorial / Best Answer

    lisha.varghese  

    • Member Since Nov-2008 | Nov 17th, 2008


    Three types of parameter modes

    1) IN parameter mode- This mode is used to pass values to the calling module when invoked.The value of IN parameter can't be changed in the module.

    2) OUT parameter mode -This mode is used to return a value to the main block.The value of OUT parameter can change anywhere in the program.

    3)IN OUT parameter mode-This mode is used to pass values to the calling module and return a value to the main block.The value of IN OUT parameter can change anywhere in the program.

    In Call By value ,the copy of actual parameter is passed to the formal parameter,So any changes to the formal parameter doesn't affect the actual parameter.

    In Call By reference,the address of actual parameter is passed to the formal parameter,so any changes to the formal parameter will change the actual parameter also,because both of them are pointing to the same memory location.
    Here  no copying is required.
     
    The IN parameter is passe by reference,so we can't change the value of IN parameter inside the module,It acts as a constant,But the OUT and IN OUT parameters are passed by value,we can change the values of OUT &  IN OUT paremeters

  • Explicit cursor and Select into statement

    what is the difference between an explicit cursor and select into statement?

    rashlikesu

    • May 12th, 2010

    When select into query returns just one row, Oracle uses implicit cursor to execute and fetch the results for the query.But if the select statement returns more than one row, an Explicit cursor is created to fetch the data.