【发布时间】:2018-12-19 16:54:26
【问题描述】:
我在table1的数据库中有以下数据
我运行以下查询并没有返回任何内容
SELECT
someColumns
FROM table1
INNER JOIN table2 ON table1.id = table2.id
INNER JOIN table3 ON table1.anotherId = table3.anotherId
我想返回 (table2 with id = table1.id and table3 with anotherId = table1.anotherId) 中的所有记录
【问题讨论】:
-
你应该阅读一下 INNER 和 OUTER 连接之间的区别
标签: mysql sql null foreign-keys inner-join