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 / bunty

Yes. you can create package where overloading will be
identified by using type of arguments.

Following code will work fine,
--WORK's FINE

create or replace package PK_TEST AS

procedure p1(a IN varchar);
procedure p1(a IN varchar2);
procedure p1(a IN char);

end PK_TEST;

But,following code will not work as p1( v1 IN varchar) and
p1(v3 IN varchar) has the same type of arguments.

--NOT WORK
create or replace package PK_TEST AS

procedure p1(v1 IN varchar);
procedure p1(v2 IN varchar2);
procedure p1(v3 IN varchar);

end PK_TEST;

Cheers,
Bunty

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can delete statement be rollbacked?

518


How would you reference column values before and after you have inserted and deleted triggers?

616


What is t-sql? : Transact sql

526


How do I restart sql?

511


What is the source code of a program?

500






What is the difference between a subquery and a join?

520


what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba

609


Explain mutating table error.

637


Explain ttitle and btitle.

666


Which are sql * plus commands?

531


Explain cursor types?

572


what is the difference between cluster and non cluster index? : Sql dba

546


Is sql microsoft?

537


What is a boolean in sql?

516


How to get each name only once from an employee table?

600