NULL AS:select出来一个虚列并且用null填充

ISNULL(X字段,0):如果“X字段”为空就把他变成0

where Address IS NULL:Address为空的条件

sql-学习笔记1

sum(case when s_id=1 then p_num else 0 end) as s1_id 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-14
  • 2022-01-13
  • 2022-02-06
  • 2021-09-26
  • 2021-09-09
  • 2022-12-23
猜你喜欢
  • 2021-08-16
  • 2021-11-14
  • 2021-08-11
  • 2022-12-23
相关资源
相似解决方案