On Update: Auto Update Date/Time Field
Posted
by Abs
on Stack Overflow
See other posts from Stack Overflow
or by Abs
Published on 2010-04-26T12:20:47Z
Indexed on
2010/04/26
12:23 UTC
Read the original article
Hit count: 167
tsql
|sql-server
Hello all,
Is there an equivalent of MySQLs on update field for SQL server?
With both DEFAULT CURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP clauses, the column has the current timestamp for its default value, and is automatically updated.
What I am looking for is to have a date/time field and every time I update a record it updates the field with the date/time it was updated automatically?
If it doesn't exist, I guess I'll have to go manual.
Thanks all
© Stack Overflow or respective owner