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.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / sudipta santra
Yes you can. Just use the nested table concept . Then u can
make another table under the column Address. For a
particular row one address value can also hold the multiple
value for addr1 and addr2.
Is This Answer Correct ? | 1 Yes | 0 No |
how to retrieve 1st and last row of table without using group functions??
Does rowid change in oracle?
I'm doing my final year and i ve planned to do an oracle certification , is this the rit tim nd wat's the future scope??
hello friends Im doing my final year engineering in B.Tech.. one of uncle said he can provide job in his company if im good in database management. but i have only basic knowledge about database, so like to join database management course in good intuition. so friends kindly help me to get good intuition because its my future.
Why we choose emp number as primarykey?
Database is hung. Old and new user connections alike hang on impact. What do you do? Your SYS SQLPLUS session IS able to connect.
17. Display the order number and average item cost for each order.
what is the syntax of DROP command?
How to display the hierarchy of employee and managers without using connect by prior.
What are triggers?Where are they used?
What is a tns file?
What is Redo Log Buffer in Oracle?