SQL Server 2008 R2: Get table_name from view from other database -


i have 2 database namely db1 , db2.

presently working on database db1. have view stored in database db2 name view_1. want table names present on view database db1.

my try:

i using database db1.

try 1:

 select table_name   information_schema.view_table_usage  view_name = 'db2..view_1'; 

try 2:

 select table_name   information_schema.view_table_usage  view_name = db2..'view_1'; 

but not getting table_name's other database view.

like this

 select table_name   db2.information_schema.view_table_usage  view_name = 'view_1'; 

Comments

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -