Adding a (calculated) LastModfied column to a frequently updated table
I've working with a table in a legacy database that is updated frequently. I'd like to add a "LastModifiedDate" column to it. The tricky part is the date should only be updated when the values in certain columns change (ie col1 or col5). There's too much legacy code to modify the UPDATE statements. So I'm looking for other options. Triggers come to mind, but I'm concerned it'll cause deadlocks or excessive blocking. Are there any other options? If not, what can be done to minimize the trigger impact?
Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.