First thing, I am totally new to SQL. I saw some tutorials, videos, tried searching but didn't find what I needed. I know it has asked before, but I couldn't find it.
What I need to find is basically like:
Select
Company.Name, Programmer.Name, Manager.Name, CEO.Name
where
Company.City = Programmer.City = Manager.City = CEO.City
like select all of them who are from London.
EDIT: Tried doing this with 2 tables only, code as below, but I'm getting an error:
SELECT Company.Name
FROM Company Cm
INNER JOIN Programmer Pg ON Cm.City = Pg.City
WHERE Cm.City = 'London'
The multi-part identifier "Company.Name" could not be bound.
Company.NametoCm.Name. – Sam Jan 06 '13 at 03:22ASkeyword before you define the aliasesCmandPg. – Sam Jan 06 '13 at 03:30select Cm.Name ...– Jan 06 '13 at 11:49