SQLTeam.com | Weblogs | Forums



Hi Team,

Why can't we create temporary triggers in sql server like temporary tables and temporary stored procedures?


What business case is there for temporary triggers? Would the temporary trigger be on a temporary table or a permanent table? Is it a global temp table or a local one?


There is no business case to use temporary triggers in my work. But i would like to know is there any specific reason for not implementing temporary triggers?


I would imagine because they would not be useful at all. If you put a temporary trigger on a permanent table, then you might as well do create/drop for a regular trigger. Or disable it instead of drop. A temporary trigger on a temporary table just doesn't make sense since you're the only one that can see it, so just run your trigger code in the stored procedure or wherever the SQL code is.

But really Microsoft would need to answer your question.