我只想计算特定列中的空值和另一列中的所有空值 特定列,但是我希望我的结果将这两个结果显示在一个表中。
这是我目前所拥有的:
Select Count(*) as 'Column1Count', Count(*) as 'Column2Count'
from table1
Where column1 is null
and column2 is null
请帮忙
最佳答案
这应该有效:
select
(select count(*) from table1 where column1 is null) as 'Column1Count',
(select count(*) from table1 where column2 is null) as 'Column2Count';
关于mysql - 仅计算两个不同列中的空值并显示在一个选择语句中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5205507/