-
hi Everybody
Can we store Varray in Table..if yes how?
pl. let me know as soon as possible..
Thanks & Regards
Amit Thakur
-
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 ...
-
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
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|