Class ObjectSchema.ComputedColumn
- Namespace
- LinqToDB.Tools.DataProvider.SqlServer.Schemas
- Assembly
- linq2db.Tools.dll
sys.computed_columns (Transact-SQL)
Applies to: √ SQL Server √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics √ Analytics Platform System (PDW)
Contains a row for each column found in sys.columns that is a computed-column.
See sys.computed_columns.
[Table(Schema = "sys", Name = "computed_columns", IsView = true)]
public class ObjectSchema.ComputedColumn
- Inheritance
-
ObjectSchema.ComputedColumn
- Inherited Members
- Extension Methods
Properties
CollationName
collation_name NULL sysname
Name of the collation of the column if character-based; otherwiseNULL.
[Column("collation_name")]
[Nullable]
public string? CollationName { get; set; }
Property Value
ColumnEncryptionKeyDatabaseName
column_encryption_key_database_name NULL sysname
The name of the database where the column encryption key exists if different than the database of the column.NULL if the key exists in the same database as the column.Applies to: SQL Server 2016 (13.x) and later versions, and SQL Database
[Column("column_encryption_key_database_name")]
[Nullable]
public string? ColumnEncryptionKeyDatabaseName { get; set; }
Property Value
ColumnEncryptionKeyID
column_encryption_key_id NULL int
ID of the column encryption key (CEK).Applies to: SQL Server 2016 (13.x) and later versions, and SQL Database
[Column("column_encryption_key_id")]
[Nullable]
public int? ColumnEncryptionKeyID { get; set; }
Property Value
- int?
ColumnID
column_id NOT NULL int
ID of the column. Is unique within the object. Column IDs might not be sequential.[Column("column_id")]
[NotNull]
public int ColumnID { get; set; }
Property Value
DefaultObjectID
default_object_id NOT NULL int
ID of the default object, regardless of whether it's a stand-alone object sp_bindefault, or an inline, column-levelDEFAULT constraint. The parent_object_id column of an inline column-level default object is a reference back to the table itself.0 = No default
[Column("default_object_id")]
[NotNull]
public int DefaultObjectID { get; set; }
Property Value
Definition
definition NULL nvarchar(max)
SQL text that defines this computed-column.[Column("definition")]
[Nullable]
public string? Definition { get; set; }
Property Value
EncryptionAlgorithmName
encryption_algorithm_name NULL sysname
Name of encryption algorithm. OnlyAEAD_AES_256_CBC_HMAC_SHA_512 is supported.Applies to: SQL Server 2016 (13.x) and later versions, and SQL Database
[Column("encryption_algorithm_name")]
[Nullable]
public string? EncryptionAlgorithmName { get; set; }
Property Value
EncryptionType
encryption_type NULL int
Encryption type:1 = Deterministic encryption2 = Randomized encryptionApplies to: SQL Server 2016 (13.x) and later versions, and SQL Database
[Column("encryption_type")]
[Nullable]
public int? EncryptionType { get; set; }
Property Value
- int?
EncryptionTypeDesc
encryption_type_desc NULL nvarchar(64)
Encryption type description:RANDOMIZEDDETERMINISTICApplies to: SQL Server 2016 (13.x) and later versions, and SQL Database
[Column("encryption_type_desc")]
[Nullable]
public string? EncryptionTypeDesc { get; set; }
Property Value
GeneratedAlwaysType
generated_always_type NULL tinyint
Identifies when the column value is generated (is always0 for columns in system tables).Applies to: SQL Server 2016 (13.x) and later versions, and SQL Database.
0 = NOT_APPLICABLE1 = AS_ROW_START2 = AS_ROW_ENDApplies to: SQL Server 2022 (16.x) and later versions, and SQL Database.
5 = AS_TRANSACTION_ID_START6 = AS_TRANSACTION_ID_END7 = AS_SEQUENCE_NUMBER_START8 = AS_SEQUENCE_NUMBER_ENDFor more information, see Temporal Tables (Relational databases).
[Column("generated_always_type")]
[Nullable]
public byte? GeneratedAlwaysType { get; set; }
Property Value
- byte?
GeneratedAlwaysTypeDesc
generated_always_type_desc NULL nvarchar(60)
Textual description of thegenerated_always_type value (always NOT_APPLICABLE for columns in system tables)Applies to: SQL Server 2016 (13.x) and later versions, and SQL Database.
NOT_APPLICABLEAS_ROW_STARTAS_ROW_ENDApplies to: SQL Server 2022 (16.x) and later versions, and SQL Database.
AS_TRANSACTION_ID_STARTAS_TRANSACTION_ID_ENDAS_SEQUENCE_NUMBER_STARTAS_SEQUENCE_NUMBER_END
[Column("generated_always_type_desc")]
[Nullable]
public string? GeneratedAlwaysTypeDesc { get; set; }
Property Value
GraphType
graph_type NULL int
Internal column with a set of values. The values are between1 and 8 for graph columns, and NULL for others.
[Column("graph_type")]
[Nullable]
public int? GraphType { get; set; }
Property Value
- int?
GraphTypeDesc
graph_type_desc NULL nvarchar(60)
Identified for informational purposes only. Not supported. Future compatibility is not guaranteed.[Column("graph_type_desc")]
[Nullable]
public string? GraphTypeDesc { get; set; }
Property Value
IsAnsiPadded
is_ansi_padded NOT NULL bit
1 = Column uses ANSI_PADDING ON behavior if character, binary, or variant0 = Column isn't character, binary, or variant
[Column("is_ansi_padded")]
[NotNull]
public bool IsAnsiPadded { get; set; }
Property Value
IsColumnSet
is_column_set NOT NULL bit
1 = Column is a column set. For more information, see Use sparse columns.
[Column("is_column_set")]
[NotNull]
public bool IsColumnSet { get; set; }
Property Value
IsComputed
is_computed NULL bit
1 = Column is a computed column
[Column("is_computed")]
[Nullable]
public bool? IsComputed { get; set; }
Property Value
- bool?
IsDataDeletionFilterColumn
is_data_deletion_filter_column NULL bit
Indicates if the column is the data retention filter column for the table.Applies to: Azure SQL Edge
[Column("is_data_deletion_filter_column")]
[Nullable]
public bool? IsDataDeletionFilterColumn { get; set; }
Property Value
- bool?
IsDroppedLedgerColumn
is_dropped_ledger_column NULL bit
Indicates a ledger table column that was dropped.Applies to: SQL Server 2022 (16.x) and later versions, and SQL Database
[Column("is_dropped_ledger_column")]
[Nullable]
public bool? IsDroppedLedgerColumn { get; set; }
Property Value
- bool?
IsDtsReplicated
is_dts_replicated NULL bit
1 = Column is replicated by using SSIS
[Column("is_dts_replicated")]
[Nullable]
public bool? IsDtsReplicated { get; set; }
Property Value
- bool?
IsFilestream
is_filestream NOT NULL bit
1 = Column is a FILESTREAM column
[Column("is_filestream")]
[NotNull]
public bool IsFilestream { get; set; }
Property Value
IsHidden
is_hidden NOT NULL bit
Indicates if the column is hidden:0 = regular, not-hidden, visible column1 = hidden columnApplies to: SQL Server 2016 (13.x) and later versions, and SQL Database
[Column("is_hidden")]
[NotNull]
public bool IsHidden { get; set; }
Property Value
IsIdentity
is_identity NOT NULL bit
1 = Column has identity values
[Column("is_identity")]
[NotNull]
public bool IsIdentity { get; set; }
Property Value
IsMasked
is_masked NOT NULL bit
Indicates if the column is masked by dynamic data masking:0 = regular, not-masked column1 = column is maskedApplies to: SQL Server 2016 (13.x) and later versions, and SQL Database
[Column("is_masked")]
[NotNull]
public bool IsMasked { get; set; }
Property Value
IsMergePublished
is_merge_published NULL bit
1 = Column is merge-published
[Column("is_merge_published")]
[Nullable]
public bool? IsMergePublished { get; set; }
Property Value
- bool?
IsNonSqlSubscribed
is_non_sql_subscribed NULL bit
1 = Column has a non-SQL Server subscriber
[Column("is_non_sql_subscribed")]
[Nullable]
public bool? IsNonSqlSubscribed { get; set; }
Property Value
- bool?
IsNullable
is_nullable NULL bit
1 = Column is nullable0 = Column isn't nullable
[Column("is_nullable")]
[Nullable]
public bool? IsNullable { get; set; }
Property Value
- bool?
IsPersisted
is_persisted NOT NULL bit
Computed column is persisted.[Column("is_persisted")]
[NotNull]
public bool IsPersisted { get; set; }
Property Value
IsReplicated
is_replicated NULL bit
1 = Column is replicated
[Column("is_replicated")]
[Nullable]
public bool? IsReplicated { get; set; }
Property Value
- bool?
IsRowGuidCol
is_rowguidcol NOT NULL bit
1 = Column is a declared ROWGUIDCOL
[Column("is_rowguidcol")]
[NotNull]
public bool IsRowGuidCol { get; set; }
Property Value
IsSparse
[Column("is_sparse")]
[NotNull]
public bool IsSparse { get; set; }
Property Value
IsXmlDocument
is_xml_document NOT NULL bit
1 = Content is a complete XML document0 = Content is a document fragment, or the column data type isn't xml
[Column("is_xml_document")]
[NotNull]
public bool IsXmlDocument { get; set; }
Property Value
LedgerViewColumnType
ledger_view_column_type NULL int
If notNULL, indicates the type of a column in a ledger view:1 = TRANSACTION_ID2 = SEQUENCE_NUMBER3 = OPERATION_TYPE4 = OPERATION_TYPE_DESCFor more information, see Ledger overview.
Applies to: SQL Server 2022 (16.x) and later versions, and SQL Database
[Column("ledger_view_column_type")]
[Nullable]
public int? LedgerViewColumnType { get; set; }
Property Value
- int?
LedgerViewColumnTypeDesc
ledger_view_column_type_desc NULL nvarchar(60)
If notNULL, contains a textual description of the the type of a column in a ledger view:TRANSACTION_IDSEQUENCE_NUMBEROPERATION_TYPEOPERATION_TYPE_DESCApplies to: SQL Server 2022 (16.x) and later versions, and SQL Database
[Column("ledger_view_column_type_desc")]
[Nullable]
public string? LedgerViewColumnTypeDesc { get; set; }
Property Value
MaxLength
max_length NOT NULL smallint
Maximum length (in bytes) of the column.-1 = Column data type is varchar(max), nvarchar(max), varbinary(max), or xml.For text, ntext, and image columns, the
max_length value is 16 (representing the 16-byte pointer only) or the value set by sp_tableoption 'text in row'.
[Column("max_length")]
[NotNull]
public short MaxLength { get; set; }
Property Value
Name
name NULL sysname
Name of the column. Is unique within the object.[Column("name")]
[Nullable]
public string? Name { get; set; }
Property Value
Object
objects (sys.objects)
[Association(ThisKey = "ObjectID", OtherKey = "ObjectID", CanBeNull = false)]
public ObjectSchema.Object Object { get; set; }
Property Value
ObjectID
object_id NOT NULL int
ID of the object to which this column belongs.[Column("object_id")]
[NotNull]
public int ObjectID { get; set; }
Property Value
Precision
precision NOT NULL tinyint
Precision of the column if numeric-based; otherwise,0.
[Column("precision")]
[NotNull]
public byte Precision { get; set; }
Property Value
RuleObjectID
rule_object_id NOT NULL int
ID of the stand-alone rule bound to the column by usingsys.sp_bindrule.0 = No stand-alone rule. For column-level CHECK constraints, see sys.check_constraints.
[Column("rule_object_id")]
[NotNull]
public int RuleObjectID { get; set; }
Property Value
Scale
scale NOT NULL tinyint
Scale of column if numeric-based; otherwise,0.
[Column("scale")]
[NotNull]
public byte Scale { get; set; }
Property Value
SystemTypeID
system_type_id NOT NULL tinyint
ID of the system type of the column.[Column("system_type_id")]
[NotNull]
public byte SystemTypeID { get; set; }
Property Value
UserTypeID
user_type_id NOT NULL int
ID of the type of the column as defined by the user. To return the name of the type, join to the sys.types catalog view on this column.[Column("user_type_id")]
[NotNull]
public int UserTypeID { get; set; }
Property Value
UsesDatabaseCollation
uses_database_collation NOT NULL bit
1 = The column definition depends on the default collation of the database for correct evaluation; otherwise, 0. Such a dependency prevents changing the database default collation.[Column("uses_database_collation")]
[NotNull]
public bool UsesDatabaseCollation { get; set; }
Property Value
XmlCollectionID
xml_collection_id NOT NULL int
Nonzero if the data type of the column is xml and the XML is typed. The value is the ID of the collection containing the validating XML schema namespace of the column0 = No XML schema collection
[Column("xml_collection_id")]
[NotNull]
public int XmlCollectionID { get; set; }