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
What are the uses of synonyms?
What happens if the update subquery returns multiple rows?
How to define an anonymous block?
What are the differences between date and timestamp in oracle?
How to insert multiple rows with one insert statement in oracle?
What are the tools for Oracle ?
What happens internally when the user types userID/password@string in SQL PLUS Thanks-Bhaskar
What is Library Cache in Oracle?
You have 4 instances running on the same UNIX box. How can you determine which shared memory and semaphores are associated with which instance?
Explain what are the characteristics of data files?
1) Does oracle have any table which contain all the exceptions and it's code internally?
How to drop an index in oracle?
How to execute a stored program unit?
How to define a variable of a specific record type?
How to create a new table in oracle?