ForeignKey Constructor (Table, String)
Initializes a new instance of the ForeignKey class on the specified table with the specified name.
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
Parameters
- table
-
Type:
Microsoft.SqlServer.Management.Smo.Table
A Table object value that specifies the table on which to create the foreign key.
- name
-
Type:
System.String
A String value that specifies the name of the foreign key.
ForeignKey Overload
ForeignKey Class
Microsoft.SqlServer.Management.Smo Namespace
Creating and Modifying FOREIGN KEY Constraints
CREATE TABLE (Transact-SQL)
Show: