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
How to load data from external tables to regular tables?
What is the sql query to concatenate column values from multiple rows in oracle?
Why does for update in oracle 8 cause an ora-01002 error?
Respected sir, Please send me technical questions related to oracle apps..
How data locks are respected in oracle?
What is a nvl function? How can it be used?
How to export your own schema?
How to see the table columns used in an index?
What do you understand by a database object? Can you list a few of them?
Explain oracle’s system global area (sga).
query optmization techniques and quwry analyser+projects+ppts
What is the difference between hot backup and cold backup in oracle? Tell about their benefits also.
Difference between cartesian join and cross join?
How to define an oracle cursor variable?
How to import one table back from a dump file?