Inner Joining three tables

前端 未结 5 603
甜味超标
甜味超标 2020-11-30 17:47

I have three tables I wish to inner join by a common column between them.

Say my tables are;

TableA TableB TableC

I wish to join

5条回答
  •  無奈伤痛
    2020-11-30 18:47

    try this:

    SELECT * FROM TableA
    JOIN TableB ON TableA.primary_key = TableB.foreign_key 
    JOIN TableB ON TableB.foreign_key = TableC.foreign_key
    

提交回复
热议问题