Three tables join in SQL

前端 未结 2 423
星月不相逢
星月不相逢 2021-01-28 19:17

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:

  • CARD: ID,Code,Name,CC
相关标签:
2条回答
  • 2021-01-28 19:21
    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

    0 讨论(0)
  • 2021-01-28 19:44

    You are missing the keyword ON, placed after the table name.

    INNER JOIN tablename ON condition...
    
    0 讨论(0)
提交回复
热议问题