Hi,
I want table structure shown below. How can i create this ?
Num Name Address
Addr1 Addr2


I want Addr1 and Addr2 under Address column.
How can i achive this ? Is it possible ?

Answer Posted / begum

hi this is really work

create type addr as object (
add1 varchar2(15),
add2 varchar2(15));
/
create table nest1 (
id number(2),
name varchar2(10),
address addr);

insert into nest1 values(10,'uma',addr('10th
main','bangalore'));
/
insert into nest1 values(20,'sami',addr('77g
colony','chennai'));

SQL> select * from nest1;

ID NAME
---------- ----------
ADDRESS(ADD1, ADD2)
--------------------------------------------
10 uma
ADDR('10th main', 'bangalore')

20 sami
ADDR('77g colony', 'chennai')

Is This Answer Correct ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I have some query regarding Report generation from Oracle Apps "PO module". I have to generate a report where table columns are as below: Vendor_name Invoice No PO Number Item_Quantity Value of Goods Date of Shipping Name_of_the_transport Date_of_receipt_issued. Now my questions is :from which table/column I can get the information of "Name_of_the_transport" column. Thanks in advance.

2890


please explain.. DB architecture ...

1568


Is truncate autocommit in oracle?

641


What is a oracle database?

610


Does facebook use oracle?

581






What is a snapshot in oracle database?

583


In the oracle version 9.3.0.5.0, what does each number shows?

753


What is partitioned table in Oracle?

639


Which are the five query types available in oracle?

532


how can we store any pdf file in oracle

1647


Does oracle partitioning improve performance?

552


What happens to the indexes if a table is recovered?

579


Explain an exception and its types?

611


how do u setup a replication site?

1502


How to create additional tablespaces for an new database?

572