有没有办法在不同的数据库中添加两个表之间的关系?
例如:
db1.dbo.table1 field id = db2.dbo.table2 field id
我正在寻找的最接近的东西是:
CREATE TRIGGER RELATIONAL on IDCLIENT
FOR INSERT
As
IF (SELECT COUNT(*) FROM table1) = 1
INSERT INTO db2.dbo.table2(ID)
SELECT ID FROM table1