I have following:
CREATE OR REPLACE TYPE mem_type2 IS VARRAY(2) of VARCHAR2(10);
CREATE TABLE test(owntype type1);
INSERT INTO test VALUES (mem_type2('0','A'));
INSERT INTO test VALUES (mem_type2('1','B'));
so my table look like:
.MEM_TYPE2('Beryl','1')
.MEM_TYPE2('Fred','2')
.MEM_TYPE2('a','3')
.MEM_TYPE2('b','4')
.MEM_TYPE2('c','5')
.MEM_TYPE2('d','6')
.MEM_TYPE2('e','7')
.MEM_TYPE2('f','8')
.MEM_TYPE2('g','9')
.MEM_TYPE2('h','10')
.MEM_TYPE2('i','11')
I want some-think like this: (to get the first value(second...)
select test.owntype(1) // second value
but thats ofcourse wrong, how it is right? i cant find it. i search only sql, if possible, anyone a idea?
The final target is following: I have to Table like this on above. And i want update the first by the second. Id is the primary key.