ForeignKey Constructor (Table, String)
Initializes a new instance of the ForeignKey class on the specified table with the specified name.
Espace de noms: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntaxe
'Déclaration
Public Sub New ( _
table As Table, _
name As String _
)
public ForeignKey (
Table table,
string name
)
public:
ForeignKey (
Table^ table,
String^ name
)
public ForeignKey (
Table table,
String name
)
public function ForeignKey (
table : Table,
name : String
)
Paramètres
- table
A Table object value that specifies the table on which to create the foreign key.
- name
A String value that specifies the name of the foreign key.
Notes
Cet espace de noms, cette classe ou ce membre est pris en charge uniquement par la version 2.0 de Microsoft .NET Framework.
Exemple
How to: Create, Alter, and Remove a Foreign Key in Visual Basic .NET
Plateformes
Plateformes de développement
Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.
Plateformes cibles
Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.
Voir aussi
Référence
ForeignKey Class
ForeignKey Members
Microsoft.SqlServer.Management.Smo Namespace
Autres ressources
Creating, Altering, and Removing Foreign Keys
Création et modification des contraintes FOREIGN KEY
CREATE TABLE (Transact-SQL)