Click here to Skip to main content
15,941,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hello,

i have 4 table

1)master::id,name_id,prdct_id,city_id

2)employe:: name_id,name

3)product::prdct_id,product

4)city::city_id,city

now how can perform inner join to show data between master table and other 3 table.

plese send me a solution.....

thnx in advance................
Posted
Updated 10-Mar-11 5:33am
v2

1 solution

Use a select statement with joins on the id fields

SELECT E.Name, P.Product, C.City 
FROM master M 
INNER JOIN employe E 
ON M.name_id = E.name_id 
INNER JOIN ...


See if you can finish this.
 
Share this answer
 
Comments
dilip.aim11 10-Mar-11 11:35am    
SELECT E.Name, P.Product, C.City
FROM master M
INNER JOIN employe E
ON M.name_id = E.name_id
INNER JOIN product p
on m.prodct_id=p.prdct_id


like this
Corporal Agarn 10-Mar-11 11:41am    
Yes, except the city table needs added in.

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