Volleynerd Knowledge Base |
Volleynerd's Things to Remember
Hot TopicsFirefox Extensions
DVD issues (latest)
Site Feed (Atom) Archives here
|
Tuesday, May 18, 2004
SQL Server Update Trigger for "last modified" dateI may need this soon - so here's an example of the syntax.Using a trigger to manitain a last modified date for a table. select 'create trigger ' name '_updatedate on ' name ' for update not for replication as update ' name ' set update_date = getdate() where id in (select id from inserted) ' from sysobjects where type = 'u' Microsoft SQL Server - Creating a Date Updated Field in Tables - SQLTeam.com: "select 'create trigger ' name '_updatedate on ' name ' for update not for replication as update ' name ' set update_date = getdate() where id in (select id from inserted) ' from sysobjects where type = 'u'" Posted 5:07 PM | 0 comments | Permalink ![]()
Comments:
Post a Comment
|