Condividi tramite


Proprietà ForeignKey.ReferencedTable

Gets or sets the table that contains the primary key referenced by the foreign key.

Questa API non è conforme a CLS. 

Spazio dei nomi  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Sintassi

'Dichiarazione
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase Or SfcPropertyFlags.Design)> _
<CLSCompliantAttribute(False)> _
<SfcReferenceAttribute(GetType(Table), "Server[@Name='{0}']/Database[@Name='{1}']/Table[@Name='{2}' and @Schema='{3}']",  _
    )> _
Public Property ReferencedTable As String 
    Get 
    Set
'Utilizzo
Dim instance As ForeignKey 
Dim value As String 

value = instance.ReferencedTable

instance.ReferencedTable = value
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase|SfcPropertyFlags.Design)]
[CLSCompliantAttribute(false)]
[SfcReferenceAttribute(typeof(Table), "Server[@Name='{0}']/Database[@Name='{1}']/Table[@Name='{2}' and @Schema='{3}']", 
    )]
public string ReferencedTable { get; set; }
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::Standalone|SfcPropertyFlags::SqlAzureDatabase|SfcPropertyFlags::Design)]
[CLSCompliantAttribute(false)]
[SfcReferenceAttribute(typeof(Table), L"Server[@Name='{0}']/Database[@Name='{1}']/Table[@Name='{2}' and @Schema='{3}']", 
    )]
public:
property String^ ReferencedTable {
    String^ get ();
    void set (String^ value);
}
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase|SfcPropertyFlags.Design)>]
[<CLSCompliantAttribute(false)>]
[<SfcReferenceAttribute(typeof(Table), "Server[@Name='{0}']/Database[@Name='{1}']/Table[@Name='{2}' and @Schema='{3}']", 
    )>]
member ReferencedTable : string with get, set
function get ReferencedTable () : String 
function set ReferencedTable (value : String)

Valore proprietà

Tipo: System.String
A String value that specifies the referenced table.

Esempi

Creazione, modifica e rimozione di chiavi esterne

Vedere anche

Riferimento

ForeignKey Classe

Spazio dei nomi Microsoft.SqlServer.Management.Smo

Altre risorse

Creazione e modifica di vincoli FOREIGN KEY

CREATE TABLE (Transact-SQL)