In my database I have the following three tables with the fields listed:
TablePS
aID
TableAM
aID(pk)
bID
TableM
bID(pk)
bName
If I know the aID in TablePS, how can I find the value of bName in TableM?
I have tried the following query:
SELECT bName FROM TableM WHERE bID=
(SELECT TablePS.aID,TableAM.aID
FROM TablePS
INNER JOIN TableAM
ON TablePS.aID= TableAM.aID)
should be sufficient.
If you need to join to table PS, then