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 do get database name at sql prompt?
A and B are tables. x is a column. Then What is difference between A.x = B.x(+) and A.x = B.x ?
When can Hash Cluster used ?
What is program global area (pga) in oracle?
What is a sub query and what are the different types of subqueries?
Whether Oracle satisfy more codd rules or db2 satisfy more codd rules? How meny of each can satisfy ? Please answer me. Advance thanks
3. Adapt your query in (2) above so that only post codes with more than twenty orders are displayed.
What is difference between sid and service name in oracle?
If youre unsure in which script a sys or system-owned object is created, but you know its in a script from a specific directory, what UNIX command from that directory structure can you run to find your answer?
Point the difference between translate and replace?
How to find the date and time of last updated table?
ABOUT IDENTITY?