📜  sql count null as 0 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:35.535000             🧑  作者: Mango

代码示例1
SELECT sum(CASE WHEN column_A IS NULL THEN 1 ELSE 0 END) A,
       sum(CASE WHEN column_B IS NULL THEN 1 ELSE 0 END) B
FROM my_table;