Results 1 to 4 of 4

Thread: array in pl/sql

  1. #1
    Join Date
    Aug 2006
    Posts
    17

    Unanswered: array in pl/sql

    Type book_rec_tab IS TABLE OF books. book_rec%TYPE
    INDEX BY BINARY_INTEGER;

    my_book_rec book_rec%TYPE;
    my_book_rec_tab book_rec_tab%TYPE;
    /* ARRAY DECLARATION */

    TYPE NAME_TABLE_TYPE IS TABLE OF VARCHAR2(20)
    INDEX BY BINARY_INTEGER ;

    NAME_TABLE NAME_TABLE_TYPE ;
    Does the above statement mean array book_rec_tab has the same datatype
    as book_rec of books.
    What does index by binary_integer mean.
    advanced thanks.

  2. #2
    Join Date
    May 2004
    Location
    Dominican Republic
    Posts
    721
    That doesn't compile at all.

    Index by binary_integer just tell your array type to be indexed by a binary_integer ( a number ) so you can use this index to reference it contents.

  3. #3
    Join Date
    Aug 2006
    Posts
    17
    /* Array Declaration */
    Type book_rec_tab IS TABLE OF books. book_rec%TYPE
    INDEX BY BINARY_INTEGER;

    my_book_rec book_rec%TYPE;
    my_book_rec_tab book_rec_tab%TYPE;
    I'am not clear with array to b indexed by binary_integer since array is of
    datatype as book_rec.

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    I suggest you take the time to visit http://tahiti.oracle.com and read the fine PL/SQL Reference Manual
    or visit http://asktom.oracle.com to see some fine coding examples.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

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