Properties

Owner: dbo 
Schema bound:  
Encrypted:  
Creation Date: 09/11/2008 
Modification Date: 09/11/2008 
Description:  

Columns

Name Data Type Length NULL IsGUID Description
  object_id  int       
  column_id  int       
  name  sysname  256       
  value  sql_variant  8016       
  definition  nvarchar  -0.5       
  EXPR1  int       
  EXPR2  int       
  type  sysname  256       
  max_length  smallint       
  precision  tinyint       
  scale  tinyint       
  collation_name  sysname  256       
  is_nullable  bit       
  is_ansi_padded  bit       
  is_rowguidcol  bit       
  is_identity  bit       
  is_computed  bit       
  seed_value  sql_variant  8016       
  increment_value  sql_variant  8016       
  EXPR3  bit       
  EXPR4  int       
Total: 21 column(s)

Extended Properties

Name Value
MS_DiagramPane1  [0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00] Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4 Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1 [50] 4 [25] 3))" End Begin PaneConfiguration = 2 NumPanes = 3 Configuration = "(H (1 [50] 2 [25] 3))" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[56] 4[18] 2) )" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1 [75] 4))" End Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End ActivePaneConfig = 0 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table = "c" Begin Extent = Top = 6 Left = 38 Bottom = 114 Right = 225 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "i" Begin Extent = Top = 6 Left = 263 Bottom = 114 Right = 450 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "ix" Begin Extent = Top = 6 Left = 488 Bottom = 114 Right = 667 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "ic" Begin Extent = Top = 6 Left = 705 Bottom = 114 Right = 876 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "fk" Begin Extent = Top = 114 Left = 38 Bottom = 222 Right = 224 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "dc" Begin Extent = Top = 114 Left = 262 Bottom = 222 Right = 442 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "prp" Begin Extent = Top = 114 Left = 480 Bottom = 222 Right = 631 End DisplayFlags = 280 TopColumn = 0 En 
MS_DiagramPane2  d Begin Table = "t" Begin Extent = Top = 114 Left = 669 Bottom = 222 Right = 834 End DisplayFlags = 280 TopColumn = 0 End End End Begin SQLPane = End Begin DataPane = Begin ParameterDefaults = "" End Begin ColumnWidths = 9 Width = 284 Width = 1500 Width = 1500 Width = 1500 Width = 1500 Width = 1500 Width = 1500 Width = 1500 Width = 1500 End End Begin CriteriaPane = Begin ColumnWidths = 11 Column = 1440 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410 GroupBy = 1350 Filter = 1350 Or = 1350 Or = 1350 Or = 1350 End End End  
MS_DiagramPaneCount 
Total: 3 extended property(s)

SQL

CREATE VIEW dbo.View_1
AS
SELECT DISTINCT
                      c.object_id, c.column_id, c.name, prp.value, dc.definition, ISNULL(ic.index_column_id, 0) - ISNULL(ic.index_column_id - 1, 0) AS EXPR1,
                      ISNULL(fk.constraint_object_id, 0) - ISNULL(fk.constraint_object_id - 1, 0) AS EXPR2, t.name AS type, c.max_length, c.precision, c.scale,
                      c.collation_name, c.is_nullable, c.is_ansi_padded, c.is_rowguidcol, c.is_identity, c.is_computed, i.seed_value, i.increment_value,
                      ISNULL(i.is_not_for_replication, 0) AS EXPR3, c.column_id AS EXPR4
FROM         sys.columns AS c LEFT OUTER JOIN
                      sys.identity_columns AS i ON i.object_id = c.object_id AND c.column_id = i.column_id LEFT OUTER JOIN
                      sys.indexes AS ix ON ix.object_id = c.object_id AND ix.is_primary_key = 1 LEFT OUTER JOIN
                      sys.index_columns AS ic ON ic.object_id = c.object_id AND c.column_id = ic.column_id AND ic.index_id = ix.index_id LEFT OUTER JOIN
                      sys.foreign_key_columns AS fk ON fk.parent_object_id = c.object_id AND fk.parent_column_id = c.column_id LEFT OUTER JOIN
                      sys.default_constraints AS dc ON dc.parent_object_id = c.object_id AND dc.parent_column_id = c.column_id LEFT OUTER JOIN
                      sys.extended_properties AS prp ON prp.minor_id = c.column_id AND prp.major_id = c.object_id AND prp.class = 1 INNER JOIN
                      sys.types AS t ON c.user_type_id = t.user_type_id

See Also

List of views