Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: How to select from object column
Hi,
Try this
SQL> create type mytype as object
2 (att1 number,
3 att2 number);
4 /
Type created.
SQL> create table mytable
2 (col1 mytype);
Table created.
SQL> insert into mytable
2 values(mytype(1,2));
1 row created.
SQL> commit;
Commit complete.
SQL> select p.col1.att1 from mytable p;
COL1.ATT1
1
SQL> select * from mytable;
COL1(ATT1, ATT2)
-----Original Message-----
From: root_at_fatcity.com [mailto:root_at_fatcity.com]On Behalf Of Andor Gyula
Sent: 01 February 2001 10:20
To: Multiple recipients of list ORACLE-L
Subject: How to select from object column
Hi Gurus !
I've got a table and an object type as follows
CREATE TYPE OBJECT AS (ATT1 NUMBER, ATT2 VARCHAR2(5)); CREATE TABLE PARAM(COL1 T_PARAM); How can I select the ATT1 values from the table?
Select COL1.ATT1 from param; doesn`t work.
Gyula
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Andor Gyula
INET: gy.andor_at_euromacc.hu
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may Received on Mon Jan 29 2001 - 05:35:20 CST
![]() |
![]() |