Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How oracle handles dead locks?

1021


what is the scripts in data base?

2080


What to do if dba lost the system password?

1091


What do you mean by redo log file mirroring?

978


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.

2320


What are the different windows events activated at runtime ?

2834


How do I spool in oracle?

940


What is the database name in oracle?

972


Where are the settings stored for each instance in oracle?

1063


Give the various exception types.

949


How to create a table index in oracle?

1086


What is the difference between formal parameters and actual parameters?

1006


How to pass parameters to procedures?

975


What is recycle bin in Oracle?

1087


How to write a query with a right outer join in oracle?

1113