Freigeben über


ForeignKey.Columns-Eigenschaft

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

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
<SfcObjectAttribute(SfcContainerRelationship.ChildContainer, SfcContainerCardinality.OneToAny, GetType(ForeignKeyColumn),  _
    SfcObjectFlags.None Or SfcObjectFlags.NaturalOrder Or SfcObjectFlags.Design)> _
Public ReadOnly Property Columns As ForeignKeyColumnCollection 
    Get
'Usage
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

Eigenschaftswert

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

Beispiele

Erstellen, Ändern und Löschen von Fremdschlüsseln

Siehe auch

Verweis

ForeignKey Klasse

Microsoft.SqlServer.Management.Smo-Namespace

Andere Ressourcen

Erstellen und Ändern von FOREIGN KEY-Einschränkungen

CREATE TABLE (Transact-SQL)