内联系不同表的2个子句?

时间:2018-03-27 14:33:19

标签: sql sql-server inner-join

我问是否可以使用join和2个不同表的子句,如:

select t1.x,t1.y, t1.z
from t1 
inner join t2 on t1.conditionA = t2.conditionA
inner join t3 on t2.conditionB = t3.conditionB
inner join t4 on t3.conditionC = t4.conditionC and t2.conditionD = t4.conditionD
where....
它是怪物吗?我该怎么办?

1 个答案:

答案 0 :(得分:-1)

是的,你可以,但这是一个线索,你的表没有很好的设计。