Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Help with a trigger!!!

Author  Topic 

arishtech
Starting Member

6 Posts

Posted - 2009-03-30 : 20:41:19
Create a trigger that will audit changes of the SafetyStockLevel column in the Product table. Whenever table is updated in such a way that the SafetyStockLevel column changes you want to insert a row in the audit table with following information: Product id, value of the old SafetyStockLevel column, value of the new SafetyStockLevel column, the date/time when the change was made the id of the user (login name and user name) that made the change.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-03-30 : 22:04:01
Show us what you tried first rather than just posting the homework or interview question.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -