sql语句在where后面加case when 条件,出现这种情况主要是由于,两个表关联查询的时候,其中一个表中的数据不清楚是否存在值,就只好就case when条件来判断。
如:where (case when a.name is null then 1 when a.name = b.name then 1 else 0 end ) = 1

相关文章:

  • 2022-12-23
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-25
  • 2022-12-23
猜你喜欢
  • 2021-11-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-30
  • 2022-12-23
相关资源
相似解决方案