Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
dsathishcse
Starting Member
3 Posts |
Posted - 2008-04-29 : 02:13:10
|
| Hi, I have 2 databases in SQL Server named Database1 and Database2. I have logged in Database1. I would like to see the records of the Table which is present in Database2. Could anyone please tell me How to access the tables in Database2 from Database1? Thanks,Sathish kumar DSathish kumar D |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-04-29 : 02:47:16
|
| If the two databases are in same server you can access it byselect * from database.schema.tableAnd if they are in different servers then:-Either add secod server as a linked server and use four part naming as select * from server.db.schema.tableor uuse OPENDATASOURCE or OPENROWSET methods. |
 |
|
|
|
|
|