左JOIN CONUNDRUM:WITCHING小时在数据库Wizard的领域中变成内在的加入
replause c.foobar for c.foobar c.fooobar; c.foobar IS NULL)
Move the c.foobar condition into the join predicate:SELECT a.foo, b.bar, c.foobar FROM tableOne AS a INNER JOIN tableTwo AS b ON a.pk = b.fk LEFT JOIN tableThree AS c ON b.pk = c.fk WHERE a.foo = 'something' AND c.foobar = 'somethingelse';
LEFT JOIN tableThree AS c ON b.pk = c.fk AND c.foobar = 'somethingelse'
Choosing between these solutions depends on the specific requirements of the query.但是,在存在子句对掌握数据检索技术至关重要的情况下,了解Left的潜在行为。
免责声明: 提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发到邮箱:[email protected] 我们会第一时间内为您处理。
Copyright© 2022 湘ICP备2022001581号-3