I'll toss one
caveat in the mix... depending on permissions on the two different databases, this might not be permitted.
@Bieke - you say it works, so in your case permissions are favorable. However, be aware that in some situations this might not be possible. For instance, if this were done on a server and two different users had opened the two DBs, Windows process-privacy rules could intervene. If you tried this again and it failed, you might be unpleasantly surprised.