Avatar of wdbates
wdbates
Flag for United States of America

asked on 

List of SQL VIEWS, with their Columns values plus the Constraints and Extended Properties - not from sys.views, but from sys.tables.

My present query list the VIEWS by Schema, View, Column Name, etc.  I have tried, but it must be Friday afternoon kicking in and drawing a blank on how to display the columns' Constraints and Extended Properties.  Not the Constraints and Extended Properties from the sys.views, but the values that are present in the table, sys.table.  

If you look at my attached query and replace sys.views with sys.tables on Line 38 and change 'U' to a 'V' on Line 45 that is what I want to see, except it's listing the views and not tables.

I have attached a file to create the Test Table with Extended Properties and a file to create the View along with my query to list all views.
List-of-views_columns_extended.sql
Create-Table.sql
Create-View.sql
Microsoft SQL Server 2008Microsoft SQL Server

Avatar of undefined
Last Comment
wdbates

8/22/2022 - Mon