Hi.  I want to insert/update multiple rows into a table which has a
timestamp field, and I want to set the timestamp field in each row to the
current timestamp.  However, it is important to me that all the rows I
update actually end up with the same timestamp value.

My concern is: what happens if the SQL query take a long time and the
current timestamp crosses a second boundary?  For example, suppose I issue
the following request on a very large table:

 UPDATE ts SET my_timestamp=NULL;

Say that this query takes 3 seconds to complete.  My questions:

1) Will all the rows have the same timestamp value?  Or will some rows have
"now", "now+1", and "now+2"?

2) Will the behavior be different if I use "my_timestamp=NOW()"?

3) If the timestamps will be different, what's the best way to make them all
the same?

Thanks in advance,

--
Dan Jakubiec

Reply via email to