
Generate Audit Table Trigger Code
This code will generate code to do a column-by-column comparison against a table, assuming that you are joining the inserted table (aliased as “i”) with the deleted table (aliased as “d”) in a trigger: SET NOCOUNT ONDECLARE @x sysnameSELECT @x = ‘authors’CREATE TABLE #x(SQL varchar(255), colid int )INSERT #xselect ‘OR