DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
SQL Columns Metainfo With References
CREATE VIEW dbo.vw_XL_TableColumnDetails
AS
SELECT tCols.TableName, tCols.ColumnName, tCols.TypeName, tCols.MaxLength, tCols.precision, tCols.scale, tCols.IsPrimaryKey, tCols.IsNullable, tCols.IsIdentity,
tCols.IsComputed, tCols.ColumnOrder, tRef.SourceTable, tRef.SourceColumn
FROM dbo.vw_XL_TableColumns AS tCols LEFT OUTER JOIN
dbo.vw_XL_TableReferences AS tRef ON tCols.TableName = tRef.TargetTable AND tCols.ColumnName = tRef.TargetColumn





