Class ObjectSchema.AllColumn
- Namespace
- LinqToDB.Tools.DataProvider.SqlServer.Schemas
- Assembly
- linq2db.Tools.dll
sys.all_columns (Transact-SQL)
Applies to: √ SQL Server (all supported versions) √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics √ Analytics Platform System (PDW)
Shows the union of all columns belonging to user-defined objects and system objects.
See sys.all_columns.
[Table(Schema = "sys", Name = "all_columns", IsView = true)]
public class ObjectSchema.AllColumn
- Inheritance
-
ObjectSchema.AllColumn
- Extension Methods
Properties
AllObject
all_objects (sys.all_objects)
[Association(ThisKey = "ObjectID", OtherKey = "ObjectID", CanBeNull = false)]
public ObjectSchema.AllObject AllObject { get; set; }
Property Value
CollationName
Name of the collation of the column if character-based; otherwise, NULL.
[Column("collation_name")]
[Nullable]
public string? CollationName { get; set; }
Property Value
ColumnID
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
ID of the default object, regardless of whether it is a stand-alone sys.sp_bindefault, or an in-line, column-level DEFAULT 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
GeneratedAlwaysType
Applies to: SQL Server 2016 (13.x) and later, SQL Database. 7, 8, 9, 10 only applies to SQL Database.
Identifies when the column value is generated (will always be 0 for columns in system tables):
0 = NOT_APPLICABLE
1 = AS_ROW_START
2 = AS_ROW_END
7 = AS_TRANSACTION_ID_START
8 = AS_TRANSACTION_ID_END
9 = AS_SEQUENCE_NUMBER_START
10 = AS_SEQUENCE_NUMBER_END
For more information, see Temporal Tables (Relational databases).
[Column("generated_always_type")]
[Nullable]
public byte? GeneratedAlwaysType { get; set; }
Property Value
- byte?
GeneratedAlwaysTypeDesc
Applies to: SQL Server 2016 (13.x) and later, SQL Database.
Textual description of generated_always_type
's value (always NOT_APPLICABLE for columns in system tables)
NOT_APPLICABLE
AS_ROW_START
AS_ROW_END
Applies to: SQL Database
AS_TRANSACTION_ID_START
AS_TRANSACTION_ID_END
AS_SEQUENCE_NUMBER_START
AS_SEQUENCE_NUMBER_END
[Column("generated_always_type_desc")]
[Nullable]
public string? GeneratedAlwaysTypeDesc { get; set; }
Property Value
IsAnsiPadded
1 = Column uses ANSI_PADDING ON behavior if character, binary, or variant.
0 = Column is not character, binary, or variant.
[Column("is_ansi_padded")]
[NotNull]
public bool IsAnsiPadded { get; set; }
Property Value
IsColumnSet
1 = Column is a column set. For more information, see Use Column Sets.
[Column("is_column_set")]
[Nullable]
public bool? IsColumnSet { get; set; }
Property Value
- bool?
IsComputed
1 = Column is a computed column.
[Column("is_computed")]
[NotNull]
public bool IsComputed { get; set; }
Property Value
IsDtsReplicated
1 = Column is replicated by using SSIS.
[Column("is_dts_replicated")]
[Nullable]
public bool? IsDtsReplicated { get; set; }
Property Value
- bool?
IsFilestream
1 = Column is declared to use filestream storage.
[Column("is_filestream")]
[NotNull]
public bool IsFilestream { get; set; }
Property Value
IsIdentity
1 = Column has identity values
[Column("is_identity")]
[NotNull]
public bool IsIdentity { get; set; }
Property Value
IsMergePublished
1 = Column is merge-published.
[Column("is_merge_published")]
[Nullable]
public bool? IsMergePublished { get; set; }
Property Value
- bool?
IsNonSqlSubscribed
1 = Column has a non-SQL Server subscriber.
[Column("is_non_sql_subscribed")]
[Nullable]
public bool? IsNonSqlSubscribed { get; set; }
Property Value
- bool?
IsNullable
1 = Column is nullable.
[Column("is_nullable")]
[Nullable]
public bool? IsNullable { get; set; }
Property Value
- bool?
IsReplicated
1 = Column is replicated.
[Column("is_replicated")]
[Nullable]
public bool? IsReplicated { get; set; }
Property Value
- bool?
IsRowGuidCol
1 = Column is a declared ROWGUIDCOL.
[Column("is_rowguidcol")]
[NotNull]
public bool IsRowGuidCol { get; set; }
Property Value
IsSparse
1 = Column is a sparse column. For more information, see Use Sparse Columns.
[Column("is_sparse")]
[Nullable]
public bool? IsSparse { get; set; }
Property Value
- bool?
IsXmlDocument
1 = Content is a complete XML document.
0 = Content is a document fragment, or the column data type is not XML.
[Column("is_xml_document")]
[NotNull]
public bool IsXmlDocument { get; set; }
Property Value
LedgerViewColumnType
Applies to: SQL Database.
If not NULL, indicates the type of a column in a ledger view:
1 = TRANSACTION_ID
2 = SEQUENCE_NUMBER
3 = OPERATION_TYPE
4 = OPERATION_TYPE_DESC
For more information on database ledger, see Azure SQL Database ledger.
[Column("ledger_view_column_type")]
[NotNull]
public byte LedgerViewColumnType { get; set; }
Property Value
LedgerViewColumnTypeDesc
Applies to: SQL Database.
If not NULL, contains a textual description of the the type of a column in a ledger view:
TRANSACTION_ID
SEQUENCE_NUMBER
OPERATION_TYPE
OPERATION_TYPE_DESC
[Column("ledger_view_column_type_desc")]
[NotNull]
public string LedgerViewColumnTypeDesc { get; set; }
Property Value
MaxLength
Maximum length (in bytes) of the column.
-1 = Column data type is varchar(max), nvarchar(max), varbinary(max), or xml.
For text columns, the max_length value will be 16 or the value set by sp_tableoption 'text in row'.
[Column("max_length")]
[NotNull]
public short MaxLength { get; set; }
Property Value
Name
Name of the column. Is unique within the object.
[Column("name")]
[Nullable]
public string? Name { get; set; }
Property Value
ObjectID
ID of the object to which this column belongs.
[Column("object_id")]
[NotNull]
public int ObjectID { get; set; }
Property Value
Precision
Precision of the column if numeric-based; otherwise, 0.
[Column("precision")]
[NotNull]
public byte Precision { get; set; }
Property Value
RuleObjectID
ID of the stand-alone rule bound to the column by using sys.sp_bindrule.
0 = No stand-alone rule.
For column-level CHECK constraints, see sys.check_constraints (Transact-SQL).
[Column("rule_object_id")]
[NotNull]
public int RuleObjectID { get; set; }
Property Value
Scale
Scale of the column if numeric-based; otherwise, 0.
[Column("scale")]
[NotNull]
public byte Scale { get; set; }
Property Value
SystemTypeID
ID of the system-type of the column.
[Column("system_type_id")]
[NotNull]
public byte SystemTypeID { get; set; }
Property Value
UserTypeID
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
XmlCollectionID
Non-zero if the column's data type is xml and the XML is typed. The value will be the ID of the collection containing the column's validating XML schema namespace
0 = no XML schema collection.
[Column("xml_collection_id")]
[NotNull]
public int XmlCollectionID { get; set; }