'How to create a trigger for all tables in a SQL Server database

I have a column LastUpdate in all tables of my database and I want to say "on insert of update LastUpdate = getdate()"

I can do this with a trigger but I find it' hard to write hundreds triggers for each table of the database. - How do I dynamically create a trigger that affect all tables? - How do I dynamically create triggers for each table ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source