I have 2 databases test1 and test2. Let's say that I have a system, that updates specific values in database test1.
Now I want to create a trigger which is placed in database test2 to check if database test1 updates the values.
When it is updated, I want to write something to database test2.
I have tried it with the following trigger:
ALTER TRIGGER [dbo].[testtrigger]
ON [test2].[dbo].[naam2]
AFTER UPDATE ON [test1].[dbo].[naam]
However, I get a syntax error at:
Incorrect syntax near 'ON'. Expecting ',',AS,NOT_FOR, or WITH
Now I wonder why this is happening. I have searched about how to do this, and the all reference to ON.
I'm using Microsoft SQL Server 2014
I will add a image to try and make it more clear if it isn't.
