Hi friends, In my project I'm using multiple tables to sotr the details.There is one main table and in the i'm storing the contact details of the family.And according to the number of members in the family I'm saving the member names and ages in different table.Now what I need is how can I retrive the details from multiple tables ? I know how to insert the details sp pls tell me that what concept i've to use for retrieving the details from different tables.If you have a sample code kindky post that also.I'll be very much useful for me... One more thing "kindly tell me whether my english is good enough to communicate with people without any fear of making mistakes".Thanks in advance :-)

8 Years
Discussion Span
Last Post by darkagn

Selecting data across multiple tables is done with a JOIN statement. There are several types of JOIN, the most basic is the INNER JOIN. This allows you to join two tables with a common set of columns. For example, if your main table has an ID field called family_id, and each member of the family is stored in another table that contains the family_id to indicate which family they belong to, then you can do this:

SELECT * FROM families
INNER JOIN family_members
ON families.family_id = family_members.family_id

There are millions of SQL examples on the web that can tell you how to join in other ways. Hope I have helped!

PS Your english is good, I understood what you were after so don't worry about it!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.