Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Writing a trigger to update a table in a different

Author  Topic 

csillagyitzik
Starting Member

2 Posts

Posted - 2007-02-20 : 15:23:57
is it possible to write a trigger, SQL server, that updates tables in a different database than the one the trigger is called from?

If it is, what is the syntax for calling the other database? My two databases are on the same server.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-02-20 : 15:36:51
Yes that is possible. You just need to reference the remote object using the 3 part naming convention:

DatabaseName.ObjectOwner.ObjectName

Tara Kizer
Go to Top of Page
   

- Advertisement -