Returning the write timestamp
A table contains a timestamp
representing the date and time that a write occurred to a column.
Using the writeTime function in a SELECT statement returns the timestamp that the column was written to the database.
The output of the function is microseconds.
Counter column writetime is milliseconds.
-
Retrieve the date/time that the value Paolo was written to the firstname column in the table cyclist_points. Use the WRITETIME function in a SELECT statement, followed by the name of a column in parentheses:
SELECT WRITETIME (firstname) FROM cycling.cyclist_points WHERE id=220844bf-4860-49d6-9a4b-6b5d3a79cbfb;
The writetime output in microseconds converts to Wed, 24 Jun 2015 01:12:05 GMT.