how do u call in & out parameters for stored procedures?

Answers were Sorted based on User's Feedback



how do u call in & out parameters for stored procedures?..

Answer / sudhir kumar singh

procedure_name(a in number,b out varchar)
(
script of execution;

)
exec procedure_name(first_parameter,second_parameter);

Is This Answer Correct ?    16 Yes 3 No

how do u call in & out parameters for stored procedures?..

Answer / soujanya

See the example below...

create or replace procedure addn(a in number,b in number, c
out number)
is
begin
c:=a+b;
dbms_output.put_line(c);
end addn;

Now we can call the in and out parameters as

declare a variable for the out parameter as

var n number;
exec addn(5,10,:n);
print n;

Is This Answer Correct ?    9 Yes 1 No

how do u call in & out parameters for stored procedures?..

Answer / mohana sundaram

create or replace procedure p_name(p_no in out number)
is begin
{
executable statement
}
end p_name;
/

Is This Answer Correct ?    8 Yes 4 No

how do u call in & out parameters for stored procedures?..

Answer / sangeetha

create or replace procedure <pocedure_name>(x in number,y
out varchar) is begin
{
executable statements;

}
end <procedure_name>;

exec <procedure_name>(first_parameter,second_parameter);

Is This Answer Correct ?    6 Yes 3 No

how do u call in & out parameters for stored procedures?..

Answer / susila

create or replace procedure <pocedure_name>(x in number,y
out number) is begin
{
executable statements;

}
end <procedure_name>;

exec <procedure_name>(10,y);

Is This Answer Correct ?    5 Yes 2 No

how do u call in & out parameters for stored procedures?..

Answer / sangeetha

<procedure_name>(in_parameter_value,
out_parameter_variable);

Is This Answer Correct ?    4 Yes 2 No

how do u call in & out parameters for stored procedures?..

Answer / venkat soma

Thanks yaar !!!!!!!!

Is This Answer Correct ?    3 Yes 2 No

how do u call in & out parameters for stored procedures?..

Answer / madhav

create or replace procedure proc_in_out
(p_empno in number,p_ename out varchar2)
as
begin
.......
.......
end;
execute proc_in_out(7369,p_ename)--out parameter can't
like this

declare
v_ename varchar2(10);
begin
proc_in_out(7369,v_ename);
end;

Is This Answer Correct ?    1 Yes 0 No

how do u call in & out parameters for stored procedures?..

Answer / rajasekar.g

matrial purchase is in and matrial sales is out for stored
procedure

Is This Answer Correct ?    0 Yes 0 No

how do u call in & out parameters for stored procedures?..

Answer / ajit

create or replace procedure P_io ( I_num1 number,
o_num2 out number,
io_num3 in out number
)
is
begin
io_num3 := io_num3 + i_num1;
o_num2 := io_num3;
end;
/

Call this store procedure
--------------------------
declare
a number := 3;
b number;
c number := 7;
begin
P_io ( a, b, c);
dbms_output.put_line ( a||' '||b||' '||c);
end;
/

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

what is single byte over head in oracle..?

0 Answers  


What is sql architecture?

0 Answers  


Why are indexes and views important to an organization?

0 Answers  


there are 2 variables called x and y ,x contains 1,2 and y contains 3,4 we have to swap the values from x to y and y to x with out using dummy variables and it can be done only by using a single statement ? how?

12 Answers   Oracle,


what is the difference between mysql_fetch_array and mysql_fetch_object? : Sql dba

0 Answers  






What is the difference between the Primary and Foreign key?

7 Answers   Cap Gemini,


IN A TABLE HAVE ONE COLUMN PRIMARY KEY..IT WILL NOT ALLOWS NULL VALUES AND DUPLICATE VALUES..INSTEAD OF PRIMARY KEY WHY CANT WE USE UNIQUE AND NOT NULL.THESE TWO ALSO DOESNT ACCEPT NULL VALUES IN NOT NULL AND UNIQUE DOESNT ACCEPT DUPLICATE VALUES? SO WHAT IS THE DIFEERENCE BETWEEN(UNIQUE,NOT NULL) AND PRIMARY KEY??????

8 Answers   rsystems,


what are the differences among these table level lock modes - IN SHARE MODE, IN SHARE UPDATE MODE, IN EXCLUSIVE MODE ?

3 Answers   HCL,


Can we relate two different tables from two different users in ORACLE,PL/SQL?

4 Answers  


What is the Diff b/w Constraints and Trigeer

4 Answers   HCL,


What is the difference between the sql*loader and import utilities? : aql loader

0 Answers  


Hi how to import oracle sequence in Informatica? Please write stored procedure code that will import oracle sequence in Informatica SP transformation as per below scenario Oracle table product list Pro_id, pro_name 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights Now a new flat file with new product list needs to be added to oracle table product list with oracle sequence. flat file product Prono,pro_name, 1, 20 watt tube light 2, 30 watt tube light & target should be like 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights. 104, 20 watt tube light 105, 30 watt tube light thks reg suvarna joshi suvarnaatsuvarna@rediffmail.com

0 Answers   TCS,


Categories