Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PL/SQL -- what does "=>" mean? 1

Status
Not open for further replies.

huchen

Programmer
Jan 24, 2006
68
US
Hello,
I saw this block of code from:

Could anybody tell me what does "=>" mean?
and where I can find more explaination of it?

I can not find help from oracle PL/SQL book.

Thank you.

procedure generate_md5
(
p_username in varchar2,
p_password in varchar2,
p_md5key out md5type
)
is
begin
dbms_obfuscation_toolkit.md5
(
input => utl_raw.cast_to_raw(p_username||p_password),
checksum => p_md5key
);
end generate_md5;
 
Look at "=>" as an arrow. What this method allows you to do is pass in arguments in any order, regardless of how the arguments are listed in the actual procedure. It also allows you to omit arguments, which can reduce a lot of clutter. In other words, you are referencing arguments by name instead of position.
If you had a procedure with 20 arguments(18 of which have default values), and you wish to provide values for just four of them, then you could invoke the procedure as follows:
Code:
my_proc(arg1=>23, arg5=>'Hello', arg2=>sysdate,arg11=>9);
instead of
Code:
my_proc(23,sysdate,null,null,'Hello',null,null,null,null,null,9,null,null,null,null,null,null,null,null,null);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top