Table.Schema

Table.Schema

Returns a table containing a description of the columns (i.e. the schema) of the specified table.

function (table as table) as table

Description

Returns a table describing the columns of table.

Each row in the table describes the properties of a column of table:

Column NameDescriptionNameThe name of the column.PositionThe 0-based position of the column in table.TypeNameThe name of the type of the column.KindThe kind of the type of the column.IsNullableWhether the column can contain null values.NumericPrecisionBaseThe numeric base (e.g. base-2, base-10) of the NumericPrecision and NumericScale fields.NumericPrecisionThe precision of a numeric column in the base specified by NumericPrecisionBase. This is the maximum number of digits that can be represented by a value of this type (including fractional digits).NumericScaleThe scale of a numeric column in the base specified by NumericPrecisionBase. This is the number of digits in the fractional part of a value of this type. A value of 0 indicates a fixed scale with no fractional digits. A value of null indicates the scale is not known (either because it is floating or not defined).DateTimePrecisionThe maximum number of fractional digits supported in the seconds portion of a date or time value.MaxLengthThe maximum number of characters permitted in a text column, or the maximum number of bytes permitted in a binary column.IsVariableLengthIndicates whether this column can vary in length (up to MaxLength) or if it is of fixed size. NativeTypeNameThe name of the type of the column in the native type system of the source (e.g. nvarchar for SQL Server).NativeDefaultExpressionThe default expression for a value of this column in the native expression language of the source (e.g. 42 or newid() for SQL Server). DescriptionThe description of the column.

Category

Table.Information