COLUMNS

用户定义对象的所有列。

表1 COLUMNS

列名称 类型 说明
object_id oid 所属对象的 ID
name name 列名称
column_id int 列的 ID
system_type_id oid 列的数据类型 ID
user_type_id oid 列的数据类型 ID
max_length smallint 列的最大字节长度
precision smallint 如果是基于 numeric 的类型,则返回对应的 precision 否则返回 0
scale smallint 如果是基于 numeric 的类型,则返回对应的 scale 否则返回 0
collation_name name 列的字符排序名称
is_nullable bit 列是否允许 null 值
is_ansi_padded bit 返回 0
is_rowguidcol bit 返回 0
is_identity bit 返回 0
is_computed bit 1 列为计算列
is_filestream bit 返回 0
is_replicated bit 1 列已发布。如果列对应的表发布,则该表的所有列都发布。
is_non_sql_subscribed bit 返回 0
is_merge_published bit 返回 0
is_dts_replicated bit 返回 0
is_xml_document bit 返回 0
xml_collection_id oid 返回 0
default_object_id oid 列的默认值的 ID
rule_object_id int 返回 0
is_sparse bit 返回 0
is_column_set bit 返回 0
generated_always_type tinyint 返回 0
generated_always_type_desc nvarchar(60) 返回 NOT_APPLICABLE
encryption_type int 列的加密类型 1 = Deterministic encryption 2 = Randomized encryption
encryption_type_desc nvarchar(64) 列的加密类型的描述 Deterministic encryption Randomized encryption
encryption_algorithm_name name 列加密的算法
column_encryption_key_id oid 加密列的Key的 ID
column_encryption_key_database_name name 返回 NULL
is_hidden bit 返回 0
is_masked bit 返回 0
graph_type int 返回 NULL
graph_type_desc nvarchar(60) 返回 NULL