Reporting on Database Views by joining sys.columns and sys.views : sys.views « System Tables Views « SQL Server / T-SQL Tutorial






4>
5>
6> SELECT v.name ViewName,
7> c.name ColumnName
8> FROM sys.columns c
9> INNER JOIN sys.views v ON
10> c.object_id = v.object_id
11> ORDER BY v.name,
12> c.name
13> GO
ViewName
         ColumnName

------------------------------------------------------------------------------------------------------------------------
-------- ---------------------------------------------------------------------------------------------------------------
-----------------

(0 rows affected)
1>








27.21.sys.views
27.21.1.Reporting on Database Views by joining sys.columns and sys.views
27.21.2.Query sys.views
27.21.3.Check a view against sys.views