Use if exists clause.

UPDATE table
SET column ='something'
WHERE key = ‘value’ IF EXISTS;





From: A <htt...@yahoo.com.INVALID>
Sent: Wednesday, September 11, 2019 11:05 PM
To: User cassandra.apache.org <user@cassandra.apache.org>
Subject: Update/where statement Adds Row

I have an update statement that has a where clause with the primary key 
(email,companyid).

When executed it always creates a new row. It’s like it’s not finding the 
existing row with the primary key.

I’m using Cassandra-driver.

What am I doing wrong? I don’t want a new row. Why doesn’t it seem to be using 
the where clause to identify the existing row?

Thanks,
Angel



Sent from Yahoo Mail for 
iPhone<https://urldefense.proofpoint.com/v2/url?u=https-3A__overview.mail.yahoo.com_-3F.src-3DiOS&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=eFshZuDXOwvmW_UjVcAH8Q&m=FgFsGQLanA1ngbbLdQ2MKd0wBFNiXHtKVDZIEi2z_Qk&s=ZTUXV9cgMyKnreKaza7UCRQTtJjk_iygFCPGYX5X1es&e=>

Reply via email to