left join from a group of tables to another group of tables in postgresql
我有一些表说t1,t2,t3。
我需要在postgresql中实现这样的东西。
1 2 | SELECT * FROM (t1 , t2) LEFT JOIN t3 WHERE t1.some_column = t3.some_column; |
但是postgresql抱怨道
ERROR: syntax error at or near"," SQL state: 42601 Character: 77
你不能使用
尝试这样的事情:
1 2 3 | SELECT * FROM t1 INNER JOIN t2 ON t1.someColumn=t2.someColumn LEFT JOIN t3 ON t1.some_column = t3.some_column; |