-2

Can we get table data from multiple database using stored procedure?

ksk
  • 11
  • 1
  • Can we get data? – ksk Oct 16 '18 at 10:34
  • If on the same server then duplicate of : https://stackoverflow.com/questions/674115/select-columns-across-different-databases - if across servers, then I believe the feature request remains outstanding. – Andrew Oct 16 '18 at 10:34
  • 3
    Possible duplicate of [Select columns across different databases](https://stackoverflow.com/questions/674115/select-columns-across-different-databases) – Clive Makamara Oct 16 '18 at 10:40
  • As above we can get data from two tables, but if we need to get table data more than two databases, is it possible to do that? – ksk Oct 16 '18 at 10:48

1 Answers1

0

Yes you can. You need to access table using database name. e.g. Select * From myDb1.Table1 Select * From myDb2.Table2

Make sure you have access to both the database or both the databases are linked if they are on different servers