I want a table like,
no name address
addr1 addr2
So i want columns like addr1,addr2 under address column.
Can one please answer me.
Advance Thanks.
Answer Posted / prabhudatta barick
--CREATE A OBJECT TO HOLD ADDRESS
CREATE OR REPLACE TYPE ADDRESSES AS
OBJECT(ADDRESS1 VARCHAR2(1000),
ADDRESS2 VARCHAR2(1000));
--CREATE TABLE
CREATE TABLE EMP (
EMPNO VARCHAR2 (5),
ENAME VARCHAR2 (30),
ADDR ADDRESSES);
--INSERT DATA
INSERT INTO EMP VALUES(0001,'PRABHUDATTA',ADDRESSES
('BANGALORE','KARNATAKA'));
COMMIT;
--SELECT DATA
SELECT EMPNO, ENAME,A.ADDR.ADDRESS1,A.ADDR.ADDRESS2 FROM
EMP A;
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
How oracle handles dead locks?
what is the scripts in data base?
What to do if dba lost the system password?
What do you mean by redo log file mirroring?
hi friends i completed b.com 2004.i have 3y accounting exp. in manufacturing company.now i have completed oracle finance.pls suggest me how will get job in oracle.can i get job in oracle.
What are the different windows events activated at runtime ?
How do I spool in oracle?
What is the database name in oracle?
Where are the settings stored for each instance in oracle?
Give the various exception types.
How to create a table index in oracle?
What is the difference between formal parameters and actual parameters?
How to pass parameters to procedures?
What is recycle bin in Oracle?
How to write a query with a right outer join in oracle?