共用方式為


ForeignKey.ReferencedKey 屬性

Gets the primary key referenced by the foreign key.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase)> _
Public ReadOnly Property ReferencedKey As String 
    Get
'用途
Dim instance As ForeignKey 
Dim value As String 

value = instance.ReferencedKey
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)]
public string ReferencedKey { get; }
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::Standalone|SfcPropertyFlags::SqlAzureDatabase)]
public:
property String^ ReferencedKey {
    String^ get ();
}
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)>]
member ReferencedKey : string
function get ReferencedKey () : String

屬性值

型別:System.String
A String value that specifies the primary key referenced by the foreign key.

範例

建立、改變和移除外部索引鍵

請參閱

參考

ForeignKey 類別

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

建立與修改 FOREIGN KEY 條件約束

CREATE TABLE (Transact-SQL)