Avatar of Member_2_1242703
Member_2_1242703
 asked on

Select query from 2 tables

I have two tables. One table is called Employees and one is called Teams.

In the Employee table I have the following columns (Name, StartDate, Position, TeamID)
In the Teams table I have the following columns (URL, Active, TeamID)

I want to select Name, StartDate, and Position from the Employee table
as well as
URL, and Active from the Teams table
Where the ID is the same

For example...
Employee record: Mike Smith | 1/1/1980 | Comptroller | 55
Teams record: www.google.com | Yes | 55

would display this in the result:

Mike Smith 1/1/1980 Comptroller www.google.com Yes

How do I do this?
Oracle DatabaseMicrosoft SQL ServerMicrosoft SQL Server 2008

Avatar of undefined
Last Comment
Hamed Nasr

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Vikas Garg

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
David Todd

PortletPaul

another SQL tutorial site: http://sqlzoo.net/wiki/Main_Page
Hamed Nasr

Agree with Vikas Garg's comment as a direct answer. Other comments help in the learning process.

If you need more info on INNER JOIN to join more tables see this article:
INNER JOIN a Number of Tables
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy