Updating multiple columns

An UPDATE writes one or more column values for a given row to a Cassandra table. A statement begins with the UPDATE keyword followed by a Cassandra table name.

In an UPDATE statement, all updates within the same partition key are applied atomically and in isolation.

Col W ); Your database management system should be able to see that for each row in Table A, all three correlated sub-queries access the same row in Table B.

Therefore, it should optimize the query so that it is only accessing the row in Table B once for each row in Table A.

That is not allowed and is never really necessary, since there are better programming practices to follow.

The reason your code cannot work is that a cursor can only be used one time to iterate each record and after a cursor has moved past a given record that record cannot be accessed again by the cursor.


Leave a Reply