如何用SQL語句查出該表中 不為空的值得數量
(studentLoginId不為空的有幾個,parentLoginId不為空的有幾個,它們的和)
select (select count(1) from table where studentLoginId is null) scount,
(select count(1) from table where parentLoginId is null)) pcount,
(select count(1) from table where studentLoginId is null)+(select count(1) from table where parentLoginId is null)) suncount
from dual;