Reputation: 12283
Perhaps a noob question, but take this T-SQL query in mind:
UPDATE Table
SET column = CURRENT_TIMESTAMP
WHERE condition
and it takes 1 minute. Will the column have the same Timestamp value or incremental? (as the time goes by) ?
And if you want to have the timestamp equal in all rows, is there any other option than with a defined variable?
Upvotes: 1
Views: 898
Reputation: 453426
It will have the same value in all rows regardless of how long the query takes. The function is evaluated once per statement not once per row.
This is the case for nearly all built in functions in SQL Server the only exceptions I am currently aware of are CRYPT_GEN_RANDOM
and NEWID
Upvotes: 2