我有三张桌子:
T1:
id | t2_connect
-----------------
1 | 2
2 | 3
3 | 2
T2:
id | t3_connect
-----------------
1 | 2
2 | 3
3 | 1
T3
id | goal
-----------------
1 | 10
2 | 100
3 | 1000
我希望通过t2表选择目标值 类似的东西:
SELECT
t1.id, t3.goal
FROM t1
JOIN t2 ON (t2.id=t1.t2_connect)
JOIN t3 ON (t3.id=t2.t3_connect)
WHERE 1
但它不起作用。(错误:未知栏' t2.t3_connect'在'条款')你可以帮助我。 我期待:
t1.id | t3.goal
-----------------
1 | 1000
2 | 10
3 | 1000
由于