ForeignKey.Columns 属性

Represents a collection of Column objects. Each Column object represents a column included in the foreign key.

命名空间:  Microsoft.SqlServer.Management.Smo
程序集:  Microsoft.SqlServer.Smo(在 Microsoft.SqlServer.Smo.dll 中)

语法

声明
<SfcObjectAttribute(SfcContainerRelationship.ChildContainer, SfcContainerCardinality.OneToAny, GetType(ForeignKeyColumn),  _
    SfcObjectFlags.None Or SfcObjectFlags.NaturalOrder Or SfcObjectFlags.Design)> _
Public ReadOnly Property Columns As ForeignKeyColumnCollection 
    Get
用法
Dim instance As ForeignKey 
Dim value As ForeignKeyColumnCollection 

value = instance.Columns
[SfcObjectAttribute(SfcContainerRelationship.ChildContainer, SfcContainerCardinality.OneToAny, typeof(ForeignKeyColumn), 
    SfcObjectFlags.None|SfcObjectFlags.NaturalOrder|SfcObjectFlags.Design)]
public ForeignKeyColumnCollection Columns { get; }
[SfcObjectAttribute(SfcContainerRelationship::ChildContainer, SfcContainerCardinality::OneToAny, 
    typeof(ForeignKeyColumn), SfcObjectFlags::None|SfcObjectFlags::NaturalOrder|SfcObjectFlags::Design)]
public:
property ForeignKeyColumnCollection^ Columns {
    ForeignKeyColumnCollection^ get ();
}
[<SfcObjectAttribute(SfcContainerRelationship.ChildContainer, SfcContainerCardinality.OneToAny, 
    typeof(ForeignKeyColumn), SfcObjectFlags.None|SfcObjectFlags.NaturalOrder|SfcObjectFlags.Design)>]
member Columns : ForeignKeyColumnCollection
function get Columns () : ForeignKeyColumnCollection

属性值

类型:Microsoft.SqlServer.Management.Smo.ForeignKeyColumnCollection
A ForeignKeyColumnCollection object that represents all the columns included in the foreign key.

示例

创建、更改和删除外键

请参阅

参考

ForeignKey 类

Microsoft.SqlServer.Management.Smo 命名空间

其他资源

创建和修改 FOREIGN KEY 约束

CREATE TABLE (Transact-SQL)