ForeignKey.Columns Property
Applies To: SQL Server 2016 Preview
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
[SfcObjectAttribute(SfcContainerRelationship.ChildContainer,
SfcContainerCardinality.OneToAny, typeof(ForeignKeyColumn),
SfcObjectFlags.None | SfcObjectFlags.NaturalOrder | SfcObjectFlags.Design)]
public ForeignKeyColumnCollection Columns { get; }
public:
[SfcObjectAttribute(SfcContainerRelationship::ChildContainer,
SfcContainerCardinality::OneToAny, (ForeignKeyColumn^::typeid),
SfcObjectFlags::None | SfcObjectFlags::NaturalOrder | SfcObjectFlags::Design)]
property ForeignKeyColumnCollection^ Columns {
ForeignKeyColumnCollection^ get();
}
[<SfcObjectAttribute(SfcContainerRelationship.ChildContainer,
SfcContainerCardinality.OneToAny, typeof(ForeignKeyColumn),
SfcObjectFlags.None | SfcObjectFlags.NaturalOrder | SfcObjectFlags.Design)>]
member Columns : ForeignKeyColumnCollection with get
<SfcObjectAttribute(SfcContainerRelationship.ChildContainer, SfcContainerCardinality.OneToAny,
GetType(ForeignKeyColumn), SfcObjectFlags.None Or SfcObjectFlags.NaturalOrder Or SfcObjectFlags.Design)>
Public ReadOnly Property Columns As ForeignKeyColumnCollection
Property Value
Type: Microsoft.SqlServer.Management.Smo.ForeignKeyColumnCollection
A ForeignKeyColumnCollection object that represents all the columns included in the foreign key.
Examples
Legacy Code Example
Creating, Altering, and Removing Foreign Keys
See Also
ForeignKey Class
Microsoft.SqlServer.Management.Smo Namespace
CREATE TABLE (Transact-SQL)
Unable to find linked topic '265bbe66-a36b-4eee-b6d4-f2972b7b2ba7'.
Return to top