I would like to get the list of all views in a database with their underlying tables. The underlying tables can be from other databases. So, I would like to know the database names of those tables as well. So, can anyone please help?
I tried below things :
SELECT * FROM [INFORMATION_SCHEMA].[VIEW_TABLE_USAGE]
But, it is not showing any database information of the tables.
I would also like know the owner information of those tables and views present in the database. So, can anyone please help?