Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Does two dimensional arrays exist in PL/SQL?
A copy of this was sent to Steinar Orset <steinar_at_quasar.no>
(if that email address didn't require changing)
On Mon, 04 Jan 1999 10:43:09 +0100, you wrote:
>Hello all procedure experts,
>I would like to work on two-dimesional arrays in PL/SQL. Is there a
>possibility for that in the
>following (or any other Oracle ) system: Personal Oracle7 Release
>7.3.3.0.0 and PL/SQL Release 2.3.3.0.0 ?
>
Sort of. Its not really a 2 dimensional array but you can have tables of records. For example:
SQL> declare
2 type myArray is table of emp%rowtype index by binary_integer;
3
3 empArray myArray;
4 begin
5 empArray(1).ename := 'Smith'; 6 empArray(1).empno := 1345;7 end;
PL/SQL procedure successfully completed.
SQL> So, you don't access empArray(1,1) := 'Smith' but rather empArray(1).ENAME := 'Smith'....
>I work on one-dimesional arrays fine like:
>
>TYPE myarray IS table OF integer INDEX BY BINARY_INTEGER;
>
>k BINARY_INTEGER :=0;
>
>person_id myarray;
>
> person_id(k):= some_number;
>
>
>Thanks for any help.
>
>Steinar.
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA
--
http://govt.us.oracle.com/ -- downloadable utilities
Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Mon Jan 04 1999 - 08:06:39 CST
![]() |
![]() |