Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have three table as follows


First Table Name A

First Name Ram

Second Table Name B

Middle Name Madan

Third Table Name C

Last Name Gopal




from using the above three tables A,B and C i want to display First Name,Middle Name and Last Name from using the above three tables.


Ouput i want as follows

Name
RamMadanGopal



for that how can i write the sql query.


please help me.


Regards,
Narasiman P.
Posted

1 solution

You can't from that little information, as there is no information which ties the three tables together. If you have an ID which refers to the other tables, or which is common to all three, then you can:
SQL
SELECT a.Name + b.Name + c.Name FROM FirstTable a
JOIN SecondTable b ON a.ID=b.ID
JOIN ThirdTable c ON a.ID=c.ID
 
Share this answer
 
Comments
Menon Santosh 15-Sep-13 10:40am    
my +5

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900