I'm new to SQL and was wondering how exactly do i use the join in a query.
i have 3 tables, with the primary keys from the first two tables acting as keys for the third table. I have to get information from the first and third tables but need to use the second table to get the information.
thanks to anyone who helps

I'm new to SQL and was wondering how exactly do i use the join in a query.
i have 3 tables, with the primary keys from the first two tables acting as keys for the third table. I have to get information from the first and third tables but need to use the second table to get the information.
thanks to anyone who helps

well.. for example...

select a.name, c.address from table1 a , table2 b, table3 c where a.memberid = c.memberid and b.deptid = c.deptid.

in this sql statment, table1,table2,table3 is joined together to retrieve the name and address from two tables using the second table. do u understand?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.