Querying VARRAY and Nested Tables
Posted on 2004-04-29
As i know that VARRAY is in order , have specific maxno. of elements and it can't be query.
and Nested Table are not in order but can be query like relational database.
For exmaple: Phone number do not need to query so i can use create it as VARRAY, coz i am retrieving collection as a whole. But if i use VARRAY in case like varray contains max 5 elements may be name of five person (Peter, John........., Thomas)
CREATE TYPE Name_vartype AS VARRAY(5) OF VARCHAR2(15);
CREATE TYPE Customer AS OBJECT (
name Name_vartype );
***In this case can i query the name of person like in relational database:
for eg: Select.................... from customer
where name ='John';
is it good idea to use varray in this case or should i use Nested Table?
If i am using nested table or Varray how can i query the cust_no along with name in both VARRAY and NEsted Tbale Case.