后续版本的 Microsoft SQL Server 将删除该功能。请避免在新的开发工作中使用该功能,并着手修改当前还在使用该功能的应用程序。
The Attributes property exposes various properties of a referenced table.
语法
object
.Attributes 
Parts
- object
 An expression that evaluates to an object in the Applies To list.
Data Type
Long, enumerated
Modifiable
Read-only
Prototype (C/C++)
HRESULT GetAttributes(LPLONG pRetVal);
Returns
The Attributes property returns a bit-packed value unpacked using these values.
| Constant | Value | Description | 
|---|---|---|
| SQLDMOTabAtt_Check | 128 | The referenced table has at least one integrity constraint. | 
| SQLDMOTabAtt_Default | 2048 | The referenced table has at least one DRI (Declarative Referential Integrity) default defined. | 
| SQLDMOTabAtt_ForeignKey | 4 | The referenced table has at least one foreign key. | 
| SQLDMOTabAtt/HasConstraint | 7300 | The referenced table has at least one DRI constraint. | 
| SQLDMOTabAtt_Identity | 1 | The referenced table has a column exposing the identity property. | 
| SQLDMOTabAtt_PrimaryKey | 512 | The referenced table has a primary key. | 
| SQLDMOTabAtt_Published | 32 | The referenced table is published for replication. | 
| SQLDMOTabAtt_Referenced | 8 | The referenced table is referenced by at least one other table's foreign key. | 
| SQLDMOTabAtt_ReplCheck | 4096 | The referenced table has at least one integrity constraint not fired when replicated data is inserted. | 
| SQLDMOTabAtt_Replica | 256 | At least one Subscriber has referenced the table's publication. | 
| SQLDMOTabAtt_Replicated | 64 | The referenced table is actively subscribed to a Publisher. | 
| SQLDMOTabAtt/SystemObject | 2 | The referenced table is a Microsoft SQL Server system object. | 
| SQLDMOTabAtt_Unique | 1024 | The referenced table has at least one UNIQUE constraint. |