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.
According to TutorialsPoint
and considering previous answers,
I guess
AS
is for stand alone (outside of any block, subprogram, package) entitiesand
IS
is for embedded (within a block, subprogram or package) entities..
Here's another difference (in 10g, at any rate)
Given a loose object type:
You can create a
loose
Table type of this object type with eitherAS
orIS
However, if you create this same table type within a package, you must use
IS
:Use of
AS
in the package yields the following error:One minor difference...
They are synonyms for packages and procedures, but not for cursors:
This works...
... but this doesn't:
None whatsover. They are synonyms supplied to make your code more readable:
FUNCTION f IS ...
CREATE VIEW v AS SELECT ...
The AS keyword is used instead of the IS keyword for creating a standalone function.
[ A standalone stored function is a function (a subprogram that returns a single value) that is stored in the database. Note: A standalone stored function that you create with the CREATE FUNCTION statement is different from a function that you declare and define in a PL/SQL block or package. ]
For more explanation, read this...
"IS" and "AS" act as a synonym while creating procedures and packages but not for a cursor, table or view.