IS and AS
From: O_TEXT <O_TEXT_at_nospam.fr>
Date: Mon, 12 Jan 2009 17:01:01 +0100
Message-ID: <gkfpg2$1187$1_at_biggoron.nerim.net>
[Quoted] [Quoted] I was wondering what is the difference between IS and AS, in general [Quoted] PL/SQL code.
IS
BEGIN
END;
... Received on Mon Jan 12 2009 - 17:01:01 CET
Date: Mon, 12 Jan 2009 17:01:01 +0100
Message-ID: <gkfpg2$1187$1_at_biggoron.nerim.net>
[Quoted] [Quoted] I was wondering what is the difference between IS and AS, in general [Quoted] PL/SQL code.
[Quoted] [Quoted] For instance of FUNCTION book_t, how can oracle know if keyword ending
the header is IS or AS;
[Quoted] [Quoted] I mean if header returns SELF and declare result variable before BEGIN,
[Quoted] or if header returns SELF AS RESULT and declare nothing before BEGIN.
CREATE OR REPLACE TYPE BODY book_t
AS
CONSTRUCTOR FUNCTION book_t (id IN INTEGER,
title IN VARCHAR2,
isbn IN VARCHAR2,
pages IN INTEGER)
RETURN SELF AS RESULT
IS
BEGIN
SELF.id := id;
SELF.title := title;
SELF.isbn := isbn;
SELF.pages := pages;
IF isbn IS NULL OR SELF.ck_digit_okay
THEN
RETURN;
ELSE
RAISE_APPLICATION_ERROR(-20000, 'ISBN ' || isbn
|| ' has bad check digit');
END IF;
END;
... Received on Mon Jan 12 2009 - 17:01:01 CET
