can use the following like overloading concept in a single
package:
procedure p1(a varchar),
procedure p1(a varchar2),
procedure p1(a char)
Answer Posted / sudhakar naraparaju
I created a test package and executed.
create or replace package test is
procedure p1(v1 in Varchar);
Procedure p2(v2 in varchar2);
procedure p3(v3 in char);
end;
/
create or replace package body test is
procedure p1(v1 in Varchar) is
begin
dbms_output.put_line(' The input data for v1 is: '||v1);
end;
Procedure p2(v2 in varchar2) is
begin
dbms_output.put_line(' The input data for v2 is: '||v2);
end;
procedure p3(v3 in char) is
begin
dbms_output.put_line(' The input data for v3 is: '||v3);
end;
end;
/
I called each procedure in sql by setting the serveroutput
on:
begin
test.P3('Testing Procedure P3');
end;
I got the below output:
The input data for v1 is: Testing Procedure P1
The input data for v2 is: Testing Procedure P2
The input data for v3 is: Testing Procedure P3
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is number function in sql?
What is use of package in pl sql?
how to increment dates by 1 in mysql? : Sql dba
How does an execution block start and end in pl sql?
When is the explicit cursor used ?
What is sqlcontext?
What is pl/sql table? Why it is used?
What is sqlerrm?
What is the maximum number of rows in sql table?
Is pl sql and postgresql same?
Difference between global and parameter variables?
What is mdf ldf and ndf?
What are sql built in functions?
What are the two parts of design view?
What does pl sql developer do?