简体   繁体   中英

Get the current value FROM Cassandra - Update USING TIMESTAMP?

I create a simple table with timestamp how to insert on it the timestampvalue also i want to use the current valueoftimestamp to do UPDATE later !

I used this instruction:

UPDATE users SET   timestampid =  dateof(now())  WHERE id= userID  ;

got this value on my table:

2016-04-14 11:18:12+0200

now want to do UPDATE USING This value

 UPDATE users USING TIMESTAMP '2016-04-14 11:18:12+0200' SET   timestampid =  dateof(now())  WHERE id= userID  ;

Invalid null value of timestamp ?

How to get the current timestampValue from Cassandra when using:

Update USING TIMESTAMP valueoftimestamp

to check if there's Modification or not using timestamp.

you should specify TIMESTAMP input in microseconds like this:

USING TIMESTAMP 1460634494030

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM