I need to create a trigger on SQL database DB1 that fires when one or more row has been inserted in table T1.
The problem is that the table where i need the trigger could be drop and re-created in a second time, so, if i write the trigger on table T1 this would be dropped too.
what's the way to do that?
TRUNCATEinstead ofDROP? That will retain the table schema and trigger.