repo.IndexColumn_virtual_gross - V

type: V ( view ), modify_date: 2022-01-05 18:06:33

RepoObject_guid: 0690291C-9D61-EB11-84DC-A81E8446D5B0

Description

Examples

Entity Diagram

entity-repo.indexcolumn_virtual_gross

Columns

Table 1. Columns of repo.IndexColumn_virtual_gross - V
PK Column Name Data Type NULL? ID

1

int

NOT NULL

nvarchar(128)

NULL

uniqueidentifier

NOT NULL

nvarchar(128)

NULL

bit

NOT NULL

bit

NOT NULL

bit

NULL

bit

NOT NULL

nvarchar(128)

NOT NULL

nvarchar(261)

NULL

nvarchar(128)

NULL

uniqueidentifier

NOT NULL

nvarchar(128)

NULL

uniqueidentifier

NOT NULL

Foreign Key Diagram

entity_1_1_fk-repo.indexcolumn_virtual_gross

References

Referencing Objects

Object Reference Diagram - 1 1

entity_1_1_objectref-repo.indexcolumn_virtual_gross

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-repo.indexcolumn_virtual_gross

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-repo.indexcolumn_virtual_gross

Column Reference Diagram

entity_1_1_colref-repo.indexcolumn_virtual_gross

Indexes

PK_IndexColumn_virtual_gross

idx_IndexColumn_virtual_gross__2

idx_IndexColumn_virtual_gross__3

idx_IndexColumn_virtual_gross__4

idx_IndexColumn_virtual_gross__5

Column Details

_

index_column_id

1

index_column_id

int

NOT NULL

column_user_type_fullname

column_user_type_fullname

nvarchar(128)

NULL

index_guid

index_guid

uniqueidentifier

NOT NULL

index_name

index_name

nvarchar(128)

NULL

Referenced Columns

is_descending_key

is_descending_key

bit

NOT NULL

is_index_primary_key

is_index_primary_key

bit

NOT NULL

is_index_real

is_index_real

bit

NULL

is_index_unique

is_index_unique

bit

NOT NULL

Object_column_name

Object_column_name

nvarchar(128)

NOT NULL

parent_Object_fullname

parent_Object_fullname

nvarchar(261)

NULL

parent_Object_name

parent_Object_name

nvarchar(128)

NULL

parent_RepoObject_guid

parent_RepoObject_guid

uniqueidentifier

NOT NULL

parent_schema_name

parent_schema_name

nvarchar(128)

NULL

RepoObjectColumn_guid

RepoObjectColumn_guid

uniqueidentifier

NOT NULL

sql_modules_definition

repo.IndexColumn_virtual_gross - V script
CREATE View repo.IndexColumn_virtual_gross
As
--
Select
    icv.index_guid
  , icv.index_column_id
  , icv.is_descending_key
  , icv.RepoObjectColumn_guid
  , iv.parent_RepoObject_guid
  , iv.index_name
  , parent_schema_name        = Coalesce ( ro.SysObject_schema_name, ro.RepoObject_schema_name )
  , parent_Object_name        = Iif(
                                    Not ro.SysObject_name Is Null
                                    And ro.is_SysObject_name_uniqueidentifier = 0
                                  , ro.SysObject_name
                                  , ro.RepoObject_name)
  , Object_column_name        = Iif(
                                    Not roc.SysObjectColumn_name Is Null
                                    And roc.is_SysObjectColumn_name_uniqueidentifier = 0
                                  , roc.SysObjectColumn_name
                                  , roc.RepoObjectColumn_name)
  , column_user_type_fullname = roc.Repo_user_type_fullname
  , iv.is_index_unique
  , iv.is_index_primary_key
  , parent_Object_fullname    = Iif(
                                    Not ro.SysObject_fullname Is Null
                                    And ro.is_SysObject_name_uniqueidentifier = 0
                                  , ro.SysObject_fullname
                                  , ro.RepoObject_fullname)
  , is_index_real             = Cast(0 As Bit)
From
    repo.IndexColumn_virtual  As icv
    Inner Join
        repo.Index_virtual    As iv
            On
            icv.index_guid            = iv.index_guid

    Inner Join
        repo.RepoObjectColumn As roc
            On
            roc.RepoObjectColumn_guid = icv.RepoObjectColumn_guid

    Left Join
        repo.RepoObject       As ro
            On
            ro.RepoObject_guid        = iv.parent_RepoObject_guid