sql server - Checking for any column updated in triggers -


i need validate in trigger on sql server 2008r2 if of columns updated.

basically have table example employee , employeehistory. insert/update/delete on employee table should generate record in history one. don't care column. example, can use

if columns_updated()      insert history??? else     nothing? 

is right way of checking this? there other function? update() specific column. what's best practice this? i'm sure i'm not first 1 want create history record of table!

using columns_updated() ok.

but if nothing updated, trigger won't fire, it?

what trying in end?


Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -