[英]How to add null values in columns in Hive
I had a table and need to add one condition in column.我有一张表,需要在列中添加一个条件。
Select Age_Flag from table where (Age_Flag <> "AB" or isnotnull(Age_Flag)=False) and Date="2022-17-01";
My condition was to exclude only Age_Flag=AB and include all null value.The above query excluding null value and Age_Flag=AB.我的条件是仅排除 Age_Flag=AB 并包括所有 null 值。上述查询不包括 null 值和 Age_Flag=AB。
You can check for NULL
values with IS
in hive also您也可以在 hive 中使用
IS
检查NULL
值
So your query will be所以你的查询将是
Select Age_Flag from table
where (Age_Flag <> "AB" or Age_Flag IS NULL) and Date="2022-17-01";
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.