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?
Mike MillerSoftware EngineerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Vikas GargBusiness Intelligence DeveloperCommented:
Hi,

You have to use Join

select Name, StartDate, Position, URL, Active  from Employee 
INNER JOIN Teams ON Employee .TeamID = Teams.TeamID

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
David ToddSenior DBACommented:
0
PortletPaulfreelancerCommented:
another SQL tutorial site: http://sqlzoo.net/wiki/Main_Page
0
hnasrCommented:
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
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.