Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Posts
    7

    Unanswered: Arrays in Oracle SQL

    When I try to create an array in Oracle 9i, it gives me an error. Here's what i did:

    SQL> type myarray is table of number index by binary_integer;

    and here's the error:

    SP2-0734: unknown command beginning "type myarr..." - rest of line ignored.


    Please teach me how to make arrays (without the easy getaround of just making a table of one type).

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1

    Re: Arrays in Oracle SQL

    Originally posted by nickbn
    When I try to create an array in Oracle 9i, it gives me an error. Here's what i did:

    SQL> type myarray is table of number index by binary_integer;

    and here's the error:

    SP2-0734: unknown command beginning "type myarr..." - rest of line ignored.


    Please teach me how to make arrays (without the easy getaround of just making a table of one type).
    Do you know the difference between SQL*Plus & PL/SQL?

  3. #3
    Join Date
    Oct 2003
    Posts
    7

    Re: Arrays in Oracle SQL

    Originally posted by anacedent
    Do you know the difference between SQL*Plus & PL/SQL?

    =( Sorry I'm a newbie... =P My teacher never told me this.

  4. #4
    Join Date
    Sep 2003
    Location
    Colombo, Sri Lanka
    Posts
    63

    Re: Arrays in Oracle SQL

    SQL Plus it just a command level editor to run simple scripts. PL/SQL is a language to code DB stuff with SQL. So in SQL Pluse you cannot creat user defined type. And in Oracle you do not get arrays. What you have tried to define is a PL table.

    Cheers,
    Suren.

Posting Permissions

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