Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to use SELECT to query this kind of table?
>>
I have a table named student 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(
sid char(9) not null, name name_o,
I know only how to insert information into this table, but have no idea how to query (SELECT statement) such as showing first name of student who live in NY. How can I do that? Actually I don't know how to do the updating (UPDATE TABLE statement)too. Please help me. <<
Select name.first
from STUDENT
where address.state = 'NY'
;
Update STUDENT
set name.middle = ''
where name.first = 'JOHN'
and name.last = 'SMITH'
;
Paul in VT Received on Thu Jan 06 2000 - 12:05:39 CST
![]() |
![]() |