CQL:无法在“Where"中取消签到条款 [英] CQL: Unable to Null Check in "Where" Clause
本文介绍了CQL:无法在“Where"中取消签到条款的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尝试返回特定字段为空或不为空的所有行.
Try to return all rows where a specific field is null or not null.
select * from ADDRESS where addr1 = null;
或
select * from ADDRESS where addr1 = 'NULL';
addr1 可以是布尔值或文本字段.
addr1 can be a boolean or text field.
我试过 != null
, is null
, <>null
和 isnull(addr1, 'NULL')
I've tried != null
, is null
, <> null
, and isnull(addr1, 'NULL')
但我明白了
no viable alternative at input '='
或
no index columns present in by-columns clause with "equals' operator"
使用 Cassandra 1.1.1 &Java 1.7_05
Using Cassandra 1.1.1 & Java 1.7_05
推荐答案
CQL 没有 NULL 的概念(但请参阅 CASSANDRA-3783).正确的做法取决于您的具体情况.
CQL doesn't have the concept of NULL (yet- see CASSANDRA-3783). The right thing to do instead depends on your particular situation.
这篇关于CQL:无法在“Where"中取消签到条款的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文