Reputation: 2059
I am newbie in SQL. I want to join three tables in SQL. Below is my query, please check and correct me where I am wrong -
Tables:
Query:
Select *
FROM CARD
INNER JOIN PGMeCode PGMeCode.Code = CARD.Code AND PGMeCode.CC = CARD.CC
INNER JOIN PGM PGM.Code = Card.Code
WHERE Card.ID = 'SomeThing'
I don't know what I am doing wrong. Please suggest me!!
Thanks in advance.
Upvotes: 0
Views: 364
Reputation: 188
SELECT * FROM CARD INNER JOIN PGMeCode ON PGMeCode.Code = CARD.Code AND PGMeCode.CC = CARD.CC INNER JOIN PGM ON PGM.Code = Card.Code WHERE Card.ID = 'SomeThing';
Try this query
Upvotes: 0
Reputation: 324610
You are missing the keyword ON
, placed after the table name.
INNER JOIN tablename ON condition...
Upvotes: 5