I have two tables, mapped with a 3rd table in a one to many relationship
TableA:
AId
AName
TableB:
BId
BName
TableB2A (just a map):
CId --just to have its own PKId
AId
BId
My Query returns all the rows in the relationship using an INNER JOIN:
... until now its easy
What I need in my query is to return all the rows with
AId, AName, BName
But I only know how to get
AId, AName, BId
TableA:
AId
AName
TableB:
BId
BName
TableB2A (just a map):
CId --just to have its own PKId
AId
BId
My Query returns all the rows in the relationship using an INNER JOIN:
Code:
SELECT TableA.*, TableB2A.BId
FROM TableA INNER JOIN TableB2A ON TableA.AId = TableB2A.AId
WHERE TableB2A.BId = @findMe
... until now its easy
What I need in my query is to return all the rows with
AId, AName, BName
But I only know how to get
AId, AName, BId