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 ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by dbms? What are its different types?

548


what is cursor. write example of it. What are the attributes of cursor.

736


What is pls integer?

577


What is the maximum size of sqlite database?

538


Who is the owner of mysql database?

543






What is the difference between a primary key and a clustered index?

514


Can we update views in sql?

524


Can you have a foreign key without a primary key?

505


how would you get the current date in mysql? : Sql dba

525


What is your daily office routine?

1792


what is data manipulation language? : Sql dba

519


Does db2 use sql?

502


What is an invalid partition table?

553


How do I remove duplicates in two columns?

500


Write an sql query to select all records from the table?

551