Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> How to use SELECT with this kind of table?
Dear all users
I created a table as below
create type name_o as object (
first varchar2(10), middle varchar2(10), last varchar2(15));
create type address_o as object (
street varchar2(15), city varchar2(15), state char(2), zip char(5));
create table student (
stuid char(11) not null,
stuname name_o,
stuaddr address_o,
stutel varchar2(11),
primary key (stuid));
then I insert some rows to this table
insert into student values (
'000-00-0001',
name_o('Steve', 'A', 'Sigler'),
address_o('210 E.Main', 'Springfield', 'IL', '61220'),
'452-4205750');
insert into student values (
'000-00-0002',
name_o('Joe', 'J', 'Livinston'),
address_o('600 W.Mill St', 'Carbondle', 'IL', '62901'),
'618-4576544');
insert into student values ('
000-00-0003',
name_o('Thomas', 'J', 'Young'),
address_o('1500 W.Cherry', 'San Francisco', 'CA', '24101'),
'235-5754864');
Could anyone tell me how can I do SELECT to bring up student first names who live in Illinois (IL)? I have tried many ways, but didn't succeeded. Please help me.
Thank you in advance
Pak
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Sun Jan 09 2000 - 09:18:56 CST
![]() |
![]() |