Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在一个表中有两列,我想要一个 SINGLE 查询:我需要每列的空值计数。据说,如果第一列包含空值,则第二列可能包含也可能不包含,反之亦然。
我是初学者,对此并没有太多想法可以尝试一下
Select column1, (Select count(*) From table Where column = null), (Select count(*) From table Where column2 = null) From table
如果要在单个查询中执行此操作,请使用子查询