Re: Is this a valid query?
Posted by: Chad Ehlers
Date: May 01, 2007 10:27PM

To answer your question yes your query is correct. But is it really is the next question.

Select *
From table1 As t1, table2 As t2
Where t1.Id = t2.Id

That will return firstly everything from table1 first, and then everything from table2. Is that really what you want? Just know that t1.id and t2.id are the same number. So you will have duplicate data in there as well.

In my experience anyways most the time you are mostly looking for data from one and some from the next table as well. For instance:

Select u.first_name, u.last_name, ud.address, ud.state
From users As u, users_data As ud
Where u.Id = ud.Users_Id

Hope that helps

Options: ReplyQuote


Subject
Written By
Posted
April 09, 2007 08:26PM
April 16, 2007 06:57AM
Re: Is this a valid query?
May 01, 2007 10:27PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.