ForeignKey.ReferencedTable 属性

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

此 API 不符合 CLS。 

命名空间:  Microsoft.SqlServer.Management.Smo
程序集:  Microsoft.SqlServer.Smo(在 Microsoft.SqlServer.Smo.dll 中)

语法

声明
<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
用法
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)

属性值

类型:System.String
A String value that specifies the referenced table.

示例

创建、更改和删除外键

请参阅

参考

ForeignKey 类

Microsoft.SqlServer.Management.Smo 命名空间

其他资源

创建和修改 FOREIGN KEY 约束

CREATE TABLE (Transact-SQL)