Does an UPDATE become an implied INSERT

前端 未结 3 713
长情又很酷
长情又很酷 2020-12-08 04:16

For Cassandra, do UPDATEs become an implied INSERT if the selected row does not exist? That is, if I say

 UPDATE users SET name = \         


        
3条回答
  •  南笙
    南笙 (楼主)
    2020-12-08 04:57

    What one can do is this however:

    UPDATE table_name SET field = false WHERE key = 55 IF EXISTS;
    

    This will ensure that your update is a true update and not an upsert.

提交回复
热议问题