I first created a Type and then created a Table and then inserted 1 row into the table which was successful but when I fire the Select query on Table I get errors:
create type My_type as Object
(
fname varchar2(10),
lname varchar2(10)
);
Now created the table
create table My_table
(
name My_type,
phone number
);
Inserted a row
insert into My_table values ( My_type('Abc','Xyz'), 122);
Fire the Select query
select * from My_table;
Error : ORA-00932: inconsistent datatypes: expected NUMBER got OODB.MY_TYPE
select name.fname, name.lname, phone from My_table;
Error : ORA-00904: "NAME"."LNAME": invalid identifier
select My_type.fname, My_type.lname, phone from My_table;
Error : ORA-00904: "MY_TYPE"."LNAME": invalid identifier