Compartilhar via


3.1.4.2.2.1.3.3.1 Columns

The DBSCHEMA_COLUMNS rowset contains the following columns.

Name

Type

Restriction

Description

TABLE_CATALOG

xsd:string

Yes

The name of the database.

TABLE_SCHEMA

xsd:string

Yes

The name of the table schema.

TABLE_NAME

xsd:string

Yes

The name of the table.

COLUMN_NAME

xsd:string

Yes

The name of the attribute hierarchy or measure.

COLUMN_GUID

uuid

The GUID of the column.

COLUMN_PROPID

xsd:unsignedInt

The property ID of the column.

ORDINAL_POSITION

xsd:unsignedInt

The column order for each constraint.

COLUMN_HAS_DEFAULT

xsd:boolean

Indicates whether the column has a default. If true, the column has a default. If false, the column does not have a default.<198>

COLUMN_DEFAULT

xsd:string

The default value of the column.<199>

COLUMN_FLAGS

xsd:unsignedInt

A bitmask that indicates column properties.

  • 0x1 - DBCOLUMNFLAGS_ISBOOKMARK – Set if the column is a bookmark.

  • 0x2 - DBCOLUMNFLAGS_MAYDEFER – Set if the column is deferred.

  • 0x4 - DBCOLUMNFLAGS_WRITE – Set if the OLEDB interface IRowsetChange::SetData can be called. For more information, see [MSDN-OLEDB].

  • 0x8 - DBCOLUMNFLAGS_WRITEUNKNOWN – Set if the column can be updated through some means, but the means is unknown.

  • 0x10 - DBCOLUMNFLAGS_ISFIXEDLENGTH – Set if all data in the column has the same length.

  • 0x20 - DBCOLUMNFLAGS_ISNULLABLE – Set if consumer can set the column to NULL or if the provider cannot determine if the column can be set to NULL.

  • 0x40 - DBCOLUMNFLAGS_MAYBENULL – Set if the column can contain NULL values, or if the provider cannot guarantee that the column cannot contain NULL values.

  • 0x80 - DBCOLUMNFLAGS_ISLONG – Set if the column contains a BLOB that contains very long data.

  • 0x100 - DBCOLUMNFLAGS_ISROWID – Set if the column contains a persistent row identifier that cannot be written to and has no meaningful value except to identify the row.

  • 0x200 - DBCOLUMNFLAGS_ISROWVER – Set if the column contains a timestamp or other versioning mechanism that cannot be written to directly and that is automatically updated to a new increasing value when the row is updated or committed.

  • 0x1000 - DBCOLUMNFLAGS_CACHEDEFERRED – Set if when a deferred column is first read its value the column is cached by the provider.

IS_NULLABLE

xsd:boolean

Indicates whether the column is nullable.<200> If true, indicates that the column is nullable. Otherwise, false.

DATA_TYPE

xsd:unsignedShort

The data type of the column. Returns a string for dimension columns and a variant for measures.

TYPE_GUID

uuid

The GUID of the column's data type.

CHARACTER_MAXIMUM_LENGTH

xsd:unsignedInt

The maximum possible length of a value in the column, expressed as the number of wide characters.

CHARACTER_OCTET_LENGTH

xsd:unsignedInt

The maximum length in octets (bytes) of the column, if the type of the column is character or binary. A value of zero means that the column has no maximum length. NULL for all other types of columns.

NUMERIC_PRECISION

xsd:unsignedShort

The maximum precision of the column if the column's data type is of a numeric data type other than DBTYPE_VARNUMERIC.

NUMERIC_SCALE

xsd:short

The number of digits to the right of the decimal point if the column's type indicator is DBTYPE_DECIMAL, DBTYPE_NUMERIC, or DBTYPE_VARNUMERIC. Otherwise, this is NULL.<201>

DATETIME_PRECISION

xsd:unsignedInt

The date/time precision (number of digits in the fractional seconds portion) of the column if the column is a DateTime or Interval type.

CHARACTER_SET_CATALOG

xsd:string

The catalog name. NULL if the provider does not support catalogs.

CHARACTER_SET_SCHEMA

xsd:string

The unqualified schema name. NULL if the provider does not support schemas.<202>

CHARACTER_SET_NAME

xsd:string

The character set name.

COLLATION_CATALOG

xsd:string

The catalog name in which the collation is defined. NULL if the provider does not support catalogs or different collations.

COLLATION_SCHEMA

xsd:string

The unqualified schema name in which the collation is defined. NULL if the provider does not support schemas or different collations.

COLLATION_NAME

xsd:string

The collation name. NULL if the server does not support different collations.

DOMAIN_CATALOG

xsd:string

The catalog name in which the domain is defined. NULL if the server does not support catalogs or domains.

DOMAIN_SCHEMA

xsd:string

The unqualified schema name in which the domain is defined. NULL if the server does not support schemas or domains.

DOMAIN_NAME

xsd:string

The domain name. NULL if the server does not support domains.

DESCRIPTION

xsd:string

The human-readable description of the column. For example, the description for a column that is named Name in the Employee table might be "Employee name." NULL if this column is not supported by the server, or if there is no description associated with the column.

COLUMN_OLAP_TYPE

xsd:string

Yes

The OLAP type of the object:

MEASURE indicates that the object is a measure.

ATTRIBUTE indicates that the object is a dimension attribute.

SCHEMA indicates that the object is a column in a schema rowset table.

The response has the following definition.

       <xsd:element name="root">
         <xsd:complexType>
           <xsd:sequence minOccurs="0" maxOccurs="unbounded">
             <xsd:element name="row" type="row" />
           </xsd:sequence>
         </xsd:complexType>
       </xsd:element>
       <xsd:simpleType name="uuid">
         <xsd:restriction base="xsd:string">
           <xsd:pattern value="[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}" />
         </xsd:restriction>
       </xsd:simpleType>
       <xsd:complexType name="row">
         <xsd:sequence>
           <xsd:element sql:field="TABLE_CATALOG" name="TABLE_CATALOG" type="xsd:string" 
                        minOccurs="0" />
           <xsd:element sql:field="TABLE_SCHEMA" name="TABLE_SCHEMA" type="xsd:string" 
                        minOccurs="0" />
           <xsd:element sql:field="TABLE_NAME" name="TABLE_NAME" type="xsd:string" 
                        minOccurs="0" />
           <xsd:element sql:field="COLUMN_NAME" name="COLUMN_NAME" type="xsd:string" 
                        minOccurs="0" />
           <xsd:element sql:field="COLUMN_GUID" name="COLUMN_GUID" type="uuid" 
                        minOccurs="0" />
           <xsd:element sql:field="COLUMN_PROPID" name="COLUMN_PROPID" type="xsd:unsignedInt" 
                        minOccurs="0" />
           <xsd:element sql:field="ORDINAL_POSITION" name="ORDINAL_POSITION" 
                        type="xsd:unsignedInt" minOccurs="0" />
           <xsd:element sql:field="COLUMN_HAS_DEFAULT" name="COLUMN_HAS_DEFAULT" 
                        type="xsd:boolean" minOccurs="0" />
           <xsd:element sql:field="COLUMN_DEFAULT" name="COLUMN_DEFAULT" type="xsd:string" 
                        minOccurs="0" />
           <xsd:element sql:field="COLUMN_FLAGS" name="COLUMN_FLAGS" type="xsd:unsignedInt" 
                        minOccurs="0" />
           <xsd:element sql:field="IS_NULLABLE" name="IS_NULLABLE" type="xsd:boolean" 
                        minOccurs="0" />
           <xsd:element sql:field="DATA_TYPE" name="DATA_TYPE" type="xsd:unsignedShort" 
                        minOccurs="0" />
           <xsd:element sql:field="TYPE_GUID" name="TYPE_GUID" type="uuid" minOccurs="0" />
           <xsd:element sql:field="CHARACTER_MAXIMUM_LENGTH" name="CHARACTER_MAXIMUM_LENGTH" 
                        type="xsd:unsignedInt" minOccurs="0" />
           <xsd:element sql:field="CHARACTER_OCTET_LENGTH" name="CHARACTER_OCTET_LENGTH" 
                        type="xsd:unsignedInt" minOccurs="0" />
           <xsd:element sql:field="NUMERIC_PRECISION" name="NUMERIC_PRECISION" 
                        type="xsd:unsignedShort" minOccurs="0" />
           <xsd:element sql:field="NUMERIC_SCALE" name="NUMERIC_SCALE" type="xsd:short" 
                        minOccurs="0" />
           <xsd:element sql:field="DATETIME_PRECISION" name="DATETIME_PRECISION" 
                        type="xsd:unsignedInt" minOccurs="0" />
           <xsd:element sql:field="CHARACTER_SET_CATALOG" name="CHARACTER_SET_CATALOG" 
                        type="xsd:string" minOccurs="0" />
           <xsd:element sql:field="CHARACTER_SET_SCHEMA" name="CHARACTER_SET_SCHEMA" 
                        type="xsd:string" minOccurs="0" />
           <xsd:element sql:field="CHARACTER_SET_NAME" name="CHARACTER_SET_NAME" 
                        type="xsd:string" minOccurs="0" />
           <xsd:element sql:field="COLLATION_CATALOG" name="COLLATION_CATALOG" 
                        type="xsd:string" minOccurs="0" />
           <xsd:element sql:field="COLLATION_SCHEMA" name="COLLATION_SCHEMA" type="xsd:string" 
                        minOccurs="0" />
           <xsd:element sql:field="COLLATION_NAME" name="COLLATION_NAME" type="xsd:string" 
                        minOccurs="0" />
           <xsd:element sql:field="DOMAIN_CATALOG" name="DOMAIN_CATALOG" type="xsd:string" 
                        minOccurs="0" />
           <xsd:element sql:field="DOMAIN_SCHEMA" name="DOMAIN_SCHEMA" type="xsd:string" 
                        minOccurs="0" />
           <xsd:element sql:field="DOMAIN_NAME" name="DOMAIN_NAME" type="xsd:string" 
                        minOccurs="0" />
           <xsd:element sql:field="DESCRIPTION" name="DESCRIPTION" type="xsd:string" 
                        minOccurs="0" />
           <xsd:element sql:field="COLUMN_OLAP_TYPE" name="COLUMN_OLAP_TYPE" type="xsd:string" 
                        minOccurs="0" />
         </xsd:sequence>
       </xsd:complexType>