GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  PL/SQL
Go To First  |  Previous Question  |  Next Question 
 PL/SQL  |  Question 27 of 166    Print  
Hello,
I need some info, that is it possible to find or make query ,that if we know the data stored in a table but don't know the field name in which the required data is stored.

Example
Table having fields like columnA, columnB, columnC, columnD,
..........columnN and all have the same dataType. and you dont know in which field your data exists.
suppose some data like e.g. "BackMan" exists in any Field of the table but we don't know in which Field this information is store.
Is it possible that we can make a query to search the data
Umair Tariq

  
Total Answers and Comments: 3 Last Update: June 28, 2007     Asked by: umair_mughal 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
March 27, 2006 02:28:08   #1  
Guna Sagar Challa        

RE: Hello,I need some info, that is it possible ...

Hi Umar

It is possible in the follwing way if u atleast know the column names where u r searching for the value

SELECT <Col1 ......Coln>

FROM <Tab1>

WHERE 'Backman' in (Col1 Col2 Col3...Coln);

It is even possible without even knowing the column names of the table atleast u know the table name. If u want to know the same feel free to email me back on gunasagarchalla@yahoo.com or for any other clarifications.

Guna Sagar Challa


 
Is this answer useful? Yes | No
May 11, 2007 01:12:52   #2  
RoulRaj        

RE: Hello,I need some info, that is it possible ...
Hello Guna Sagar



Please give one example i.e without knowing the column name one can write a query.



Regards

Roul

 
Is this answer useful? Yes | No
June 27, 2007 23:22:32   #3  
Chinmay        

RE: Hello,I need some info, that is it possible ...
Yes

you can do by
using like with or


like
select * from tab1
where col1 like ' back '
or col2 like ' back '
or col3 like ' back '
or col4 like ' back '



 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape