Listing All Views of ALL Databases in SQL Server
In
this blog we see, How to list all the views from all the database in sql
server.
? – Indicates the name of database.
This
will iterate all the database in the sql server and list the sys views as
section based on the database.
sp_msforeachdb 'select
"?" AS dbName, * from [?].sys.views'
You can also use like below,
select * from
[DatabaseName].sys.views
Thanks for reading this article. Have a nice day.


kiquenet kiquenetPosted Nov 6, 2018, 10:48 PM EST
Script for get all databases ?