Compared to pl / sql
I thought the oracle considers both "is" and "as" the same for functions and procedures. I tried googling with "pl / sql is vs as" and got the following link which says both are the same.
IS vs AS for PL / SQL Oracle Function or Procedure Creation
But I found http://www.adp-gmbh.ch/ora/plsql/coll/declaration.html#index_by which seems to indicate the difference. Can anyone (list / point me to a link) other contexts where using "is / as" matters ?.
Thanks.
a source to share
As an example (not all from PL / SQL):
[CREATE] PROCEDURE x IS|AS ...
[CREATE] FUNCTION x IS|AS ...
CREATE PACKAGE [BODY] x IS|AS ...
CREATE TYPE [BODY] x IS|AS ...
CURSOR x IS ...
TYPE x IS ...
SUBTYPE x IS ...
CREATE TABLE x AS subquery
SELECT x AS "y" FROM z AS "w"
WITH x AS (SELECT ...
Hence, it is AS
not always allowed where IS
is, and IS
not always allowed where AS
:)
Just one of those language quirks, I guess. Generally IS
more common, I think, except when AS
is the only option (as in the SQL examples above). Most of the examples in the Oracle docs seem to use IS
, and personally that my preference seems to be better semantically in my opinion.
Literature:
a source to share