Possible Duplicate:
Add Foreign Key relationship between two Databases
What i know is that i can add a foregin key constraint, so that one column in table A can reference to another column in table B using :
CONSTRAINT fk FOREIGN KEY (column) REFERENCES toTable(toColumn)
but here both tables are in the same database. I want to know if i can reference to table in another database. For instance , i have two databases: databaseA and databaseB, when i want to associate them, i prefer adding some table in databaseA reference to another table in databaseB. But i don't know how. Something like :
CONSTRAINT fk FOREIGN KEY (column) REFERENCES [databaseB].[toTable](toColumn)
doesn't work.