MySQL Forums
Forum List  »  InnoDB

help with select query from 2 tables
Posted by: Ankur Saxena
Date: July 01, 2005 08:43AM

Hi, I am not new to SQL but i have only been working on very simple SQL tasks over the months. I have 2 tables:

Registry
-Phonenum
-Name
-SID
-DID

DInfo
-DID
-IP

Now I have these tables where Registry can have 100s of thousands and even upto a million entries.
DInfo only has few hundred or so.

I have only simply designed these tables without specifying primary key and foriegn key(should be DID) in this case.

Now I want to select IP such that I find an entry in Registry, get the DID and with that look into DInfo and get the IP, can this be done efficiently in one select or will it be more efficient in 2 selects?

Thanks for any info.

Ankur

ps:- also can you please suggest a book with advance SQL and DB table design(efficiently)

Options: ReplyQuote


Subject
Views
Written By
Posted
help with select query from 2 tables
5650
July 01, 2005 08:43AM


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.