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 start an oracle instance?
What are advantages of dateset in datastage?
Explain overloading. Can functions be overloaded?
What will be the syntax to find current date and time in format "yyyy-mm-dd"?
1.how to extract the second highest salary from emp table having sal as a column which contains the salary of all employee of an organisation.
How to bring a tablespace offline?
Can you have more than one content canvas view attached with a window ?
what is the difference between oracle enterprise edition and oracle express edition?
How to shutdown your 10g xe server?
Can an Integrity Constraint be enforced on a table if some existing table data does not satisfy the constraint ?
What are virtual columns?
What is SGA ? How it is different from Ver 6.0 and Ver 7.0 ?