left join 中on后的条件和where后条件的区别

这里我在left join 后加了一个条件 lend.first_repayment_date IS NOT NULL 但是结果还是有NULL的情况

left join 中on后的条件和where后条件的区别

这时我用where

left join 中on后的条件和where后条件的区别

输出了我想要的结果

此时我用关联了另一个表

left join 中on后的条件和where后条件的区别此时我用on 后面加条件得到了我想要的结果,此时条件加在on后和where后结果是一样的。这种情况是因为buyer.business_order_accept_id =acc.id  即所有的acc.id 都能在buyer表中找到符合条件的busines_order_accept_id

相关文章:

  • 2021-03-28
  • 2021-09-22
  • 2021-11-29
  • 2021-10-29
  • 2021-12-07
  • 2022-02-18
  • 2022-01-16
猜你喜欢
  • 2021-06-15
  • 2021-12-03
  • 2022-12-23
  • 2021-05-20
  • 2021-05-31
  • 2021-05-20
  • 2021-08-01
相关资源
相似解决方案