GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Oracle  >  General
Go To First  |  Previous Question  |  Next Question 
 General  |  Question 204 of 210    Print  
hi how to place different column in on column
eg:if we have address column in that we have to place addr1,addr2,addr3.

  
Total Answers and Comments: 5 Last Update: February 10, 2007     Asked by: vijay 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
September 22, 2006 09:03:10   #1  
opbang Member Since: March 2006   Contribution: 46    

RE: hi how to place different column in on column

CREATE OR REPLACE TYPE address AS OBJECT (
add1   varchar2(25),
add2   varchar2(25),

add3   varchar3(25)

);

CREATE TABLE customer (
cust_id    NUMBER(10),

Cust_name  varchar2(25),
addre      address);

set describe depth all;

desc customer;

INSERT INTO customer

(cust_id, cust_name addre)
VALUES
(1, ‘Ramesh’, address('Plot No.25', 'Sidharth Colony, ‘Hyderabad'));


INSERT INTO customer

(cust_id, cust_name addre)
VALUES
(2, ‘Suresh’, address('Plot No.42', 'Sri Ram Nagar, ‘Bangalore'));


SELECT * FROM customer;

-- selective select


SELECT *
FROM customer p
WHERE p.addre.add3 = 'Hyderabad';




 
Is this answer useful? Yes | No
October 11, 2006 07:50:49   #2  
Dhruv        

RE: hi how to place different column in on column

Above mention solution doesn't work. check it out.


 
Is this answer useful? Yes | No
December 12, 2006 00:05:33   #3  
sravan1 Member Since: September 2006   Contribution: 10    

RE: hi how to place different column in on column
The above solution is working. Correct the gramatical mistakes and it is fixed.
 
Is this answer useful? Yes | No
January 10, 2007 01:34:55   #4  
neela manohar        

RE: hi how to place different column in on column
 better to use nested table concept here.
 
Is this answer useful? Yes | No
February 10, 2007 12:51:01   #5  
ddkdhar Member Since: June 2006   Contribution: 48    

RE: hi how to place different column in on column
can any body explain the concept here
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape