You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Sylvain Lebresne <sy...@datastax.com> on 2014/10/01 11:06:07 UTC

Re: Not-Equals (!=) in Where Clause

Right, my bad, thanks Tyler for the correction.

On Tue, Sep 30, 2014 at 5:44 PM, Tyler Hobbs <ty...@datastax.com> wrote:

> I think Sylvain may not have had his coffee yet.  You can't use IF's in
> SELECT statements, but you can in INSERT/UPDATE/DELETE:
>
> UPDATE foo SET a = 0 WHERE k = 0 IF b != 0;
>
> On Tue, Sep 30, 2014 at 2:36 AM, Sylvain Lebresne <sy...@datastax.com>
> wrote:
>
>>
>>
>>> Is != supported as part of the where clause in Cassandra?
>>>
>>
>> It's not.
>>
>> Or is it the grammar for some other purpose?
>>>
>>
>> It's supported in 'IF' conditions. You can do something like:
>>   SELECT * FROM foo WHERE k = 0 IF v != 3;
>>
>> --
>> Sylvain
>>
>
>
>
> --
> Tyler Hobbs
> DataStax <http://datastax.com/>
>