cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryabin, Thomas" <>
Subject RE: DELETE query failing in CQL 3.0
Date Mon, 22 Oct 2012 13:45:05 GMT
I figured out the problem. The DELETE query only works if the column used in the WHERE clause
is also the first column used to define the PRIMARY KEY.


From: wang liang []
Sent: Monday, October 22, 2012 1:31 AM
Subject: Re: DELETE query failing in CQL 3.0

It is better to provide table definition. I guess the reason is below statement.
" a table must define at least one column that is not part of the PRIMARY KEY as a row exists
in Cassandra only if it contains at least one value for one such column "
Please check this document here<>.

On Mon, Oct 22, 2012 at 7:53 AM, aaron morton <<>>
Can you paste the table definition ?


Aaron Morton
Freelance Developer

On 20/10/2012, at 5:53 AM, "Ryabin, Thomas" <<>>

I have a column family called "books", and am trying to delete all rows where the "title"
column is equal to "hatchet". This is the query I am using:
    DELETE FROM books WHERE title = 'hatchet';

This query is failing with this error:
    Bad Request: PRIMARY KEY part title found in SET part

I am using Cassandra 1.1 and CQL 3.0. What could be the problem?


Best wishes,
Helping others is to help myself.

View raw message