简体   繁体   中英

Count null values in a single column using hiveql

I would like to count the number of null values in a single column.

With:

select count(1)
from usedcars3
where model is NULL

I managed to get count of the null values in a single column in SQL however when I ran:

select count(1) 
from usedcars3 
where model is null; 

in hive,

it gave me back 0 as the result.

I've searched around and haven't found anything as to why.

Any help/insight would be greatly appreciated.

select count(*) from usedcars3 where model is null; 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM