I just want the "ModifyDate" column to automatically populate for me when the record is either inserted or updated.
Should I use triggers or use a calculated column normally?
(Using SSMS2005 and SQL Server 2005 Express)
The INSERTed part is simple - just define a default value for this column, and when you insert a new row, do not specify a value for this column.
UPDATE - UPDATE, . , SQL Server .
: ? , "" , , ROWVERSION ( TIMESTAMP).
TIMESTAMP
, - - INSERT UPDATE - .
Date Modified , getDate .
:
FirstName = 'Jim', LastName = 'Jones', DateModified = getDate()
, .
, . . , , , .
, , , . , , .