I have 2 databases. One, named Test, has a table named Vehicles. Another, named Test2 has a table named Clients.
When I insert a new record on the Vehicles table in Test, I need to update the NumVehicles field on the Clients table in Test2.
Is this possible using triggers?
This is working code is given below
You need something like
The only difference between updating the table in current and another db is that you need to refer a "remote" table using [db_name].[schema_name].[table_name]