Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IS vs AS keywords for PL/SQL Oracle Function or Procedure Creation [duplicate]

Tags:

sql

oracle

plsql

I have been trying to find out what the difference is between the IS and AS keywords in PL/SQL when creating an Oracle function or procedure.

I have searched and have been unable to find any information on this. Does anyone know the difference?

like image 252
Joel Cunningham Avatar asked Feb 25 '10 23:02

Joel Cunningham


People also ask

Is Vs as in PL SQL procedures?

Question: What is the difference between 'IS' and 'AS' in PL/SQL? Answer: The PL/SQL language evolved such the the "IS" and "AS" operators are equivalent. Functionally the "IS" and "AS" syntax performs identical functions and can be used interchangeably.

What is the difference between is and as in Oracle function and procedure?

There is no difference between is/as ... is is used for creating a new procedure with a new name where as 'as' is used to create a new procedure with existing procedure name... it will not display "procedure already exists".

Which of the following keywords is used in creation of a procedure in PL SQL?

The procedure body begins with the keyword IS (or AS ) and ends with the keyword END followed by an optional procedure name.

Can a procedure and function have same name?

No. This is clearly stated in the MSDN documentation: Procedure names must comply with the rules for identifiers and must be unique within the schema.


2 Answers

I've never known there to be a difference. The Oracle documentation implies that they are synonyms:

The function body begins with the keyword IS (or AS) and ends with the keyword END followed by an optional function name.

like image 70
OMG Ponies Avatar answered Sep 21 '22 19:09

OMG Ponies


Same as DISTINCT and UNIQUE in select statements. i.e, there is no material difference between 'IS' and 'AS'. Backwards compatibility and meeting standards

like image 30
pj. Avatar answered Sep 22 '22 19:09

pj.