Results 1 to 2 of 2

Thread: data types

  1. #1
    Join Date
    Jan 2012
    Posts
    12

    Unanswered: data types

    Hi all,

    I have a package called pkg1 which was developed by some other guy.within that package there is an user defined data type called OBJ_CONTACT.

    within that package in two times it has described variable called RVAL which is OBJ_CONTACT type in two different ways like following.

    RVAL OBJ_CONTACT := OBJ_CONTACT (NULL,NULL,NULL,NULL);
    and
    RVAL := OBJ_CONTACT (NULL,NULL,NULL,NULL);

    what is the difference from this two?can anyone please explain this scenario ?

  2. #2
    Join Date
    Mar 2007
    Posts
    623
    Quote Originally Posted by Tharangi View Post
    what is the difference from this two?can anyone please explain this scenario ?
    From syntactical point of view, the first one contains additional type name after variable name.
    From functional point of view, the first one is variable declaration and assignment (usable in declarative part of PL/SQL block), the second one is only assignment (usable in executable part of PL/SQL block).

    Fortunately, Oracle also contains a large set of materials about its functionality called "documentation". PL/SQL language is fully described in PL/SQL User's Guide and Reference book, which is available e.g. online on http://tahiti.oracle.com/
    Please, consult it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •