Compartilhar via


Construtor ForeignKey (Table, String)

Initializes a new instance of the ForeignKey class on the specified table with the specified name.

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

Sintaxe

'Declaração
Public Sub New ( _
    table As Table, _
    name As String _
)
'Uso
Dim table As Table 
Dim name As String 

Dim instance As New ForeignKey(table, name)
public ForeignKey(
    Table table,
    string name
)
public:
ForeignKey(
    Table^ table, 
    String^ name
)
new : 
        table:Table * 
        name:string -> ForeignKey
public function ForeignKey(
    table : Table, 
    name : String
)

Parâmetros

Exemplos

Criando, alterando e removendo chaves estrangeiras

Consulte também

Referência

ForeignKey Classe

Sobrecarregado ForeignKey

Namespace Microsoft.SqlServer.Management.Smo

Outros recursos

Criando e modificando restrições FOREIGN KEY

CREATE TABLE (Transact-SQL)