May 10, 2008

Find out all the views in a database using SQL Server 2005

In order to find out all the views in a database, use this query :

USE AdventureWorks
SELECT [name] AS ViewName
,create_date as CreationDate
,modify_date as ModificationDate
FROM sys.views

You can also get various other info like SchemaName from sys.views using the query:

SELECT [name] AS ViewName, SCHEMA_NAME(schema_id) AS SchemaName
FROM sys.views

Did you like this post?
kick it on
subscribe via rss subscribe via e-mail
print this post follow me on twitter

About The Author

Suprotim Agarwal, ASP.NET Architecture MVP works as an Architect Consultant and provides consultancy on how to design and develop Web applications.

Suprotim is also the founder and primary contributor to DevCurry, DotNetCurry and SQLServerCurry. He has also written an EBook 51 Recipes using jQuery with ASP.NET Controls.

Follow him on twitter @suprotimagarwal



0 Responses to "Find out all the views in a database using SQL Server 2005"

Copyright © 2009-2016 All Rights Reserved for by Suprotim Agarwal | Terms and Conditions