Topic: SQL*Plus and PL/SQL >> About Function
|
Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property.
You may review the entire Oracle Certification Program Candidate Agreement online Here.
|
|
|
|
| bhmadhukar |
Posted: Feb 07, 2008 07:49:52 AM |
Total Post: 14
Joined: Jan, 2008
|
Why actually we [Is|AS] in function? Plz Clearly Specify the difference and usage of using IS & AS? Why & when?
In adv. thanx |
|
|
Garlapati |
| Posted: Feb 08, 2008 12:16:27 AM | |
|
Total Post: 30
Joined: Apr, 2007
|
Hi,
ACCORDING MY KNOWLEDGE, I think nothing differen of
In / As both we can use in function or procedure
like
create or replace procedure <procedurename>(<parameters>)
IS / AS
IF ANY WRONG PLZ LET ME KNOW.
|
|
|
|
|
bhmadhukar |
| Posted: Feb 15, 2008 12:35:17 AM | |
|
Total Post: 14
Joined: Jan, 2008
|
Below shows the difference between [IS/AS] used with function.
As: When a function is returning a value with the help of local variable to that function 'AS' keyword is used.
ex:
create or replace function pivalue
return number as
pi number;
begin
pi:=3.14;
return pi;
end pivalue;
/
Is: When a function is returning a value with the help of parameter/argument and without help of local variable, 'IS' keyword is used.
ex:
create or replace function pivalue
return number is
begin
null;
return 3.14;
end pivalue;
/
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |
|
|
|
|
Forum Rules & Description
Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user
|
| |
Get FREE Magazines
|
Top 10 Forum User
|
| Murtuja Khokhar | 857 |
| Mohammed Taj | 746 |
| positive fanatic | 483 |
| Jayanta Sur | 479 |
| Vigyan Kaushik | 386 |
| Gopu Gopi | 333 |
| Gitesh Trivedi | 322 |
| Vinoth Kumar | 264 |
| neeraj sharma | 258 |
| Ramesh Jois | 246 |
|
|