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 |
What are the various types of snapshots ?
SELECT * FROM (SELECT TITLE FROM MOVIE ORDER BY RANK DESC) WHERE ROWNUM > 4; when i run the above query .it produces output as NO ROWS SELECTED.why ?plz any one help me
List out the components of logical database structure of oracle database.
can we pass two out parameters at a time in function?please answer to my question
Query to get max and second max in oracle in one query ?
34 Answers CTS, Keane India Ltd, TCS, Wipro,
What is the string concatenation operator in oracle?
when loggined as SYSTEM,how to display all the users of database using sql query?
What is an oracle recycle bin?
what is normalisation?what are its uses?
How can we manage the gap in a primary key column created by a sequence? Ex:a company has empno as primary key generated by a sequence and some employees leaves in between.What is the best way to manage this gap?
Difference between cartesian join and cross join?
What is RULE-based approach to optimization ?