join seperate databases

How do you join tables that are NOT in the same database (2 different databases)?
MBHEY131Asked:
Who is Participating?
 
Daniel WilsonConnect With a Mentor Commented:
Same server or different?  If different servers ... I don't think you can do that.

If it's the same server, include the DB name with the tablenames.

select * from
DbAlpaha.CoolTable C Inner Join DbBeta.WeirdTable W on C.ID = W.ID;

Open in new window

0
 
MBHEY131Author Commented:
Same Server
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.