Home » SQL & PL/SQL » SQL & PL/SQL » procedure / function / package header declaration (10g)
procedure / function / package header declaration [message #415154] Sat, 25 July 2009 08:02 Go to next message
ajitpal.s
Messages: 204
Registered: November 2006
Senior Member
Hi ,

I just wish to confirm, what is the right way of declaring a procedure / function package. For example:
create or replace procedure test1 is

create or replace package test1 is

create or replace package body test1 is

create or replace function test1 is

I noticed certain declaration is done using 'as' instead of 'is'.
Can it be used interchageably?

[Updated on: Sat, 25 July 2009 09:12] by Moderator

Report message to a moderator

Re: procedure / function / package header declaration [message #415156 is a reply to message #415154] Sat, 25 July 2009 08:26 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
They can be used interchangeably (Creating Stored Procedures and Functions ).
Re: procedure / function / package header declaration [message #415161 is a reply to message #415156] Sat, 25 July 2009 08:44 Go to previous messageGo to next message
ajitpal.s
Messages: 204
Registered: November 2006
Senior Member
Im just wondering why there is such flexbility, is there any pros cons between the 2?
Re: procedure / function / package header declaration [message #415163 is a reply to message #415161] Sat, 25 July 2009 09:13 Go to previous messageGo to next message
Michel Cadot
Messages: 64132
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Because someone prefer saying "IS" and other prefer saying "AS".

Regards
Michel
Re: procedure / function / package header declaration [message #415183 is a reply to message #415163] Sat, 25 July 2009 21:42 Go to previous messageGo to next message
ajitpal.s
Messages: 204
Registered: November 2006
Senior Member
thanks michel, but thats strange
Re: procedure / function / package header declaration [message #415200 is a reply to message #415183] Sun, 26 July 2009 04:46 Go to previous messageGo to next message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Difference between use of IS or AS is so insignificant that it is amazing that someone is willing to spend that much energy just to discover its roots.
Re: procedure / function / package header declaration [message #415213 is a reply to message #415200] Sun, 26 July 2009 07:09 Go to previous message
ajitpal.s
Messages: 204
Registered: November 2006
Senior Member
thank you little foot
Previous Topic: varchar2 with specific lenght
Next Topic: query using ref cursor
Goto Forum:
  


Current Time: Wed Dec 07 22:21:58 CST 2016

Total time taken to generate the page: 0.11586 seconds