The title says (asks) it all. Is it possible to create a trigger on a table synonym in SQL Server (2005 or higher)?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
closed as off topic by Paul White♦, Phil, dezso, Mark Storey-Smith, RolandoMySQLDBA Jan 30 '13 at 4:22
Questions on Database Administrators Stack Exchange are expected to relate to database administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.
No, it is not. I assume you tried this, but you will get this error:
You also can't create a constraint on a synonym, reference a synonym in a foreign key constraint, etc. Most metadata operations must apply to the base table, not the synonym. The synonym is essentially used as a "syntactic sugar" pointer to assist in DML/CRUD, not DDL.