Hi is there any way I can use != operator using CQL in Cassandra? I am trying to use a != operator on my columnfamily but when I try using that it says:
cqlsh:EPCContent> select * from "MediaCategoryGroup" where "MCategoryID"!=1;
I get this error:
Invalid syntax at line 1, char 55
select * from "MediaCategoryGroup" where "MCategoryID"!=1;
^
If you look at the Cassandra SELECT syntax, you will see that the WHERE
clause must be "composed of relations on the columns that are part of the PRIMARY KEY and/or have a secondary index defined on them." Does your column conform to that specification?
Just for your information this is the full list of relation operators: '=' | '<' | '>' | '<=' | '>=' | '!=' | IN | CONTAINS | CONTAINS KEY
.