DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: urgent

  1. #1
    Join Date
    Feb 2002
    Posts
    15
    hi Everybody

    Can we store Varray in Table..if yes how?
    pl. let me know as soon as possible..
    Thanks & Regards
    Amit Thakur

  2. #2
    Join Date
    Dec 2001
    Posts
    141
    Yes you can store varray in a table.
    Like the following

    CREATE TYPE PhoneList_vartyp AS VARRAY(10) OF VARCHAR2(20);
    CREATE TABLE Emp
    (
    empno NUMBER NOT NIULL,
    empname VARCHAR2(30),
    phone PhoneList_vartyp
    );

    Hope this help ...

  3. #3
    Join Date
    Sep 2001
    Location
    Düsseldorf, Germany.
    Posts
    588
    Code:
    CREATE TYPE arr_name IS VARRAY(5) of VARCHAR2(10); 
    
    CREATE TABLE hello (id NUMBER, name ARR_NAME)
    
    INSERT INTO hello VALUES (1, arr_name('test1','test2','test3'));
    INSERT INTO hello VALUES (2, arr_name('testA','testB','testC'));
    
    SQL> SELECT a.id, b.* 
    FROM hello a, table (a.name) b; 
    
            ID COLUMN_VAL
    ---------- ----------
             1 test1
             1 test2
             1 test3
             2 testA
             2 testB
             2 testC
    + http://www.cs.oberlin.edu/faculty/jd...lecture26.html

    HTH

    Sameer

  4. #4
    Join Date
    Feb 2002
    Posts
    15
    Thanks Guys..
    It helps a lot..If ther's anything else I will come to u again.
    Thanks again...
    Amit

Posting Permissions

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


Click Here to Expand Forum to Full Width