Even if you are connected to one databse, you can retrive data from other database tables. For that you need to mention DSN name.
Ex:-
If i am in database1 and i want to access table in database 2 then, query will be
select * from database2.dbo.table1
<Database Name>.dbo.<Table Name>
If i am in database1 and i want to access table in database 2 then, query will be
select * from database2.dbo.table1
No comments:
Post a Comment