Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between "AS" and "IS" in an Oracle stored procedure?

I see Oracle procedures sometimes written with "AS", and sometimes with "IS" keyword.

CREATE OR REPLACE Procedure TESTUSER.KILLINSTANCE (INSTANCEID integer) **AS** ... 

vs.

CREATE OR REPLACE Procedure TESTUSER.KILLINSTANCE (INSTANCEID integer) **IS** ... 

Is there any difference between the two?


Edit: Apparently, there is no functional difference between the two, but some people follow a convention to use "AS" when the SP is part of a package and "IS" when it is not. Or the other way 'round. Meh.
like image 746
Ishmaeel Avatar asked Oct 23 '08 16:10

Ishmaeel


People also ask

Is Vs as in Oracle procedure?

They are equivalent. Just different way of writing. Use what you like better. The difference is that way back in the day, there was one developer in one building on the Oracle campus that started using "is".

What is difference between is and as in procedure in Plsql?

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 is keyword in stored procedure?

Creating a simple stored procedure The AS keyword separates the heading and the body of the stored procedure. If the stored procedure has one statement, the BEGIN and END keywords surrounding the statement are optional. However, it is a good practice to include them to make the code clear.

Is keyword in PL SQL procedure?

The procedure body begins with the keyword IS (or AS ) and ends with the keyword END followed by an optional procedure name. The procedure body has three parts: an optional declarative part, an executable part, and an optional exception-handling part.


1 Answers

None whatsover. They are synonyms supplied to make your code more readable:

FUNCTION f IS ...

CREATE VIEW v AS SELECT ...

like image 163
Tony Andrews Avatar answered Oct 04 '22 01:10

Tony Andrews