[英]how to check if a value is modified from the last time (UPDATE -INSERT) in Cassandra
if UPDATE USING Timestamp
is the answer, then how does it work? if UPDATE USING Timestamp
是答案,那么它如何工作? How can I get the current timestamp value to know if has been modified or not? 如何获取当前时间戳值以了解是否已修改?
You can use writetime() function to get timestamp of when a cell was written. 您可以使用writetime()函数获取写入单元格的时间戳。
INSERT INTO excelsior.clicks (userid, url, date, name)
VALUES (
cfd66ccc-d857-4e90-b1e5-df98a3d40cd6,
'http://google.com',
'2013-10-11', 'Bob'
);
SELECT url, date, name, WRITETIME(name) FROM excelsior.clicks
WHERE userid = cfd66ccc-d857-4e90-b1e5-df98a3d40cd6;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.