get data from multiple tables

I have two tables
a. manager
b. team

manager table has manager_id,manager_name

team table is the table which contains team member which reports to a manager in manager table.
Team table has 3 columns, manager_id, Team_member_name, Team_member_address

I need to display a result set with column Manager_name, Team_member_address.

Please help
dojjolAsked:
Who is Participating?
 
slightwv (䄆 Netminder)Connect With a Mentor Commented:
I would look at a redesign and self-join.

Create an 'employee' table then have manager_id reference the emp_id.  There are a tone of links on this type of design.

Based on what you have (assuming manager_name is in the manager table):
select manager_name, address from
manager, team
where manager.name=team.manager_name
0
 
derekkrommConnect With a Mentor Commented:
select m.manager_name, t.team_member_address from
manager m
inner join team t
on m.manager_id = t.manager_id
0
 
jimyXConnect With a Mentor Commented:
select m.Manager_name, t.Team_member_address from manager m, team t where m.manager_id = t.manager_id;
0
 
dojjolAuthor Commented:
not a solution, I was looking for
0
All Courses

From novice to tech pro — start learning today.