【发布时间】:2015-01-11 20:08:24
【问题描述】:
我正在尝试加入这些表格:
table1 table2 table3
-------------------------------------------------
table1Id table2Id table3Id
name table1Id table2Id
name2 name3
如何加入这 3 个表?
例如这样的: PS。示例不起作用
SELECT table1.name, table2.name2 , table3.name3 from table3
left join on(table2.table2Id=table3.table2Id)
left join on(table1.table1Id=table2.table1Id) group by table1.table1Id
【问题讨论】:
-
怎么不工作了?
-
© 不理解错误:#1136 - 列数与第 1 行的值计数不匹配
-
@GordonLinoff
left join之后没有指定表 -
@peace 您尝试使用
group by有什么原因吗?这通常与分析函数一起使用,我看不到在查询中使用。
标签: mysql sql select left-join