vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello to all, I have say two databases A and B. A database has tables a1 and a2. B database has a table b1. My question is Can i write a trigger for the table b1, which access the fields from the table a1 and a2? Simply, can i write a trigger which access data from other databases? Thank you in advance, vishnu |
| ||||
| Sure for different databases on the same server you can use the threepart name: Database.Owner.ObjectName (e.g. SELECT * FROM somedatabase.dbo.SomeTable) For database on a different server you have to use a linekd server within the fourpart name: linkedServername.Database.Owner.ObjectName (e.g. SELECT * FROM linkedServername.Database.Owner.ObjectName ) HTH, jens Suessmeyer. |