-- If your DB is located on the same server then try the following code
SELECT FROM ..
eg : SELECT ID FROM DB2.dbo.Employee
If you are trying to access a remote database then you should either create a linked server or try using OPERNROWSET function
No one has followed this question yet.