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 ?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / ashok
create table emp(num number(5),name varchar2(14),address
varchar2(15));
insert into emp values('&num','&name','&address');
Enter value for num:
Enter value for name:
Enter value for address: addr1 addr2
old 1: insert into emp values('&num','&name','&address')
new 1: insert into emp values('','','addr1 addr2')
Is This Answer Correct ? | 1 Yes | 12 No |
In Exception handling if we are using the when others first then what happens . whether it will show the compiler error
Explain an index?
How to build data dictionary view an new database?
How to get last row id?
Explain the use of consistent option in exp command.
Explain self joins in oracle?
what is insert all statement in sql
What is cursor
1. How actually index will work ? 2. Why do people prefer mostly bitmap index and btree index in datawarehouse ? 3. If I use the column in aggrigate functions like max,min,count and avg and if I have a index created on that column, will it increases the performance ?
what is grid in Oracle 10g...
Can we write dml statement in function in oracle?
what is data abstraction