Type Property (Index)
后续版本的 Microsoft SQL Server 将删除该功能。请避免在新的开发工作中使用该功能,并着手修改当前还在使用该功能的应用程序。
The Type property exposes configured attributes of the referenced Microsoft SQL Server component.
语法
object
.Type [= value]
Parts
- object
An expression that evaluates to an object in the Applies To list.
- value
A long integer that specifies index attributes as described in Settings.
Data Type
Long, enumerated
Modifiable
Read/write when using the Index object to define a SQL Server index. Read-only when the Index object references an existing SQL Server index.
Prototype (C/C++)
HRESULT GetType(SQLDMO_INDEX_TYPE* pRetVal)
HRESULT SetType(SQLDMO_INDEX_TYPE NewValue)
Settings
Constant | Value | Description |
---|---|---|
SQLDMOIndex_Clustered |
16 |
The index is clustered. SQL Server supports a single clustered index on any table. |
SQLDMOIndex_Default |
0 |
The index is nonclustered. |
SQLDMOIndex_DRIIndex |
6144 |
The index is used to maintain a declarative referential constraint. |
SQLDMOIndex_DRIPrimaryKey |
2048 |
The index implements a SQL Server PRIMARY KEY constraint. A value is returned only. For more information, see Key Object. |
SQLDMOIndex_DRIUniqueKey |
4096 |
The index implements a UNIQUE constraint on a table not constrained by primary key. The index is a candidate key. |
SQLDMOIndex_DropExist |
32768 |
Optimizes index creation when an existing index is rebuilt. |
SQLDMOIndex_Hypothetical |
32 |
Redirects index creation, mapping Index object manipulation to CREATE STATISTICS and DROP STATISTICS statements. |
SQLDMOIndex_IgnoreDupKey |
1 |
Controls error generation when an INSERT or UPDATE operation could cause a constraint violation and the index implements a PRIMARY KEY or UNIQUE constraint. |
SQLDMOIndex_NoRecompute |
16777216 |
Creates index with statistics computation off. For more information, see NoRecompute Property. |
SQLDMOIndex_PadIndex |
256 |
Index nodes are padded using a fill factor. |
SQLDMOIndex_SortedData |
512 |
Obsolete. |
SQLDMOIndex_/SortedDataReorg |
8192 |
Obsolete. |
SQLDMOIndex_Unique |
2 |
The index implements a UNIQUE constraint. |
SQLDMOIndex_Valid |
41747 |
The index is valid. |