Click here to Skip to main content
13,148,186 members (38,789 online)
Rate this:
Please Sign up or sign in to vote.
See more:
i have created three table table1 BookingDetails,table2 Customerdetails,table3 booking, i want to get the details from table2 and table3 all tables customerid is common....
and the details in the table3 are saved with the id's not name....example towerid ,flatid and i need tower name and flat name...and these are stored in another two tables table4 towermaster,table5 flat master,and in this there is no customerid...only towerid and its possible it will possible are not??

thnk q
Posted 12-Sep-12 20:00pm
Updated 12-Sep-12 20:02pm
Kuthuparakkal 13-Sep-12 2:02am
Learn SQL Join
_Amy 13-Sep-12 2:31am
:thumbsup: I could have given you +5 for this comment. :)
rajushyamu7 13-Sep-12 5:17am
thank you.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

As suggested, you need a JOIN statement:

Get name from other table:
Alias has AKAName and ActorID
Actors has Name and Id

SELECT a.Name, b.AKAName
 FROM Actors a JOIN Alias b ON a.Id = b.ActorId

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170924.2 | Last Updated 13 Sep 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100