Home » SQL & PL/SQL » SQL & PL/SQL » RETRIEVING THE DATA FROM MULTIPLE TABLES
RETRIEVING THE DATA FROM MULTIPLE TABLES [message #252991] Sat, 21 July 2007 03:32 Go to next message
nagaraju.ch
Messages: 98
Registered: July 2007
Location: bangalore
Member
I want to retrieve the data from multiple tables without using joins? Pls send me the how can i do it?
Re: RETRIEVING THE DATA FROM MULTIPLE TABLES [message #252996 is a reply to message #252991] Sat, 21 July 2007 05:20 Go to previous messageGo to next message
Volder
Messages: 38
Registered: April 2007
Location: Russia
Member
be more exact in what way you want it to be outputed?
what kind of data in them? give example of your input and desirable output.
Re: RETRIEVING THE DATA FROM MULTIPLE TABLES [message #253004 is a reply to message #252991] Sat, 21 July 2007 07:31 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Write one SELECT statement per table.

Or, if possible, use UNION operator.

Or, put all tables into a single SELECT statement and don't join them. You'll get a Cartesian product, but who cares?

BTW, why would you want to do that? What's wrong with JOIN?
Re: RETRIEVING THE DATA FROM MULTIPLE TABLES [message #253027 is a reply to message #252996] Sat, 21 July 2007 10:28 Go to previous messageGo to next message
nagaraju.ch
Messages: 98
Registered: July 2007
Location: bangalore
Member
I want data from two tables without using join and we have to use only one select statement.we should not get cartecian product.


It was asked in Iflex.
Re: RETRIEVING THE DATA FROM MULTIPLE TABLES [message #253033 is a reply to message #253027] Sat, 21 July 2007 12:57 Go to previous messageGo to next message
kalibabu07
Messages: 1
Registered: July 2007
Location: 10-177,indiranagar,goplal...
Junior Member

SELECT COLUMNNAME,COLUMNNAME.. FROM TABLENAME A,TABLENAME B WHERE A.UNIQUECOLUMN=B.UNIQUECOLUMN;

Re: RETRIEVING THE DATA FROM MULTIPLE TABLES [message #253034 is a reply to message #253033] Sat, 21 July 2007 13:22 Go to previous messageGo to next message
Michel Cadot
Messages: 64145
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Welcome to the forum.
Please don't use CAPITALS to write your message.
Please CAREFULLY read the question before posting.
OP clearly said:
Quote:
without using joins

How do you call:
Quote:
A.UNIQUECOLUMN=B.UNIQUECOLUMN

Regards
Michel

[Updated on: Sat, 21 July 2007 13:22]

Report message to a moderator

Re: RETRIEVING THE DATA FROM MULTIPLE TABLES [message #253042 is a reply to message #253034] Sat, 21 July 2007 22:17 Go to previous messageGo to next message
nagaraju.ch
Messages: 98
Registered: July 2007
Location: bangalore
Member
Thank you for reply. This question is from interviewer of iflex.
at that time I cannot answer to that question.

thank you
raju
Re: RETRIEVING THE DATA FROM MULTIPLE TABLES [message #253055 is a reply to message #253042] Sun, 22 July 2007 00:46 Go to previous message
Michel Cadot
Messages: 64145
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This question is silly without a context (and yes you can say that to interviewer).
So ask why do you want to do this?
Always ask why? Answer always depends on the need.

Moreover, Littlefoot gave you an answer, didn't you read it?

Regards
Michel
Previous Topic: The following error is also happening on mirror db only: ORA-12705 or ORA-12702 errors
Next Topic: what is rowid and rownumber
Goto Forum:
  


Current Time: Fri Dec 09 11:46:22 CST 2016

Total time taken to generate the page: 0.13753 seconds