次の方法で共有


ForeignKey クラス

ForeignKey オブジェクトは、SQL Server 外部キーを表します。

名前空間:  Microsoft.SqlServer.Management.Smo
アセンブリ:  Microsoft.SqlServer.Smo (Microsoft.SqlServer.Smo.dll)

構文

'宣言
Public NotInheritable Class ForeignKey _
    Inherits ScriptNameObjectBase _
    Implements ICreatable, IDroppable, IMarkForDrop, IAlterable,  _
    IRenamable, IExtendedProperties, IScriptable, IPropertyDataDispatch
'使用
Dim instance As ForeignKey
public sealed class ForeignKey : ScriptNameObjectBase, 
    ICreatable, IDroppable, IMarkForDrop, IAlterable, IRenamable, 
    IExtendedProperties, IScriptable, IPropertyDataDispatch
public ref class ForeignKey sealed : public ScriptNameObjectBase, 
    ICreatable, IDroppable, IMarkForDrop, IAlterable, IRenamable, 
    IExtendedProperties, IScriptable, IPropertyDataDispatch
[<SealedAttribute>]
type ForeignKey =  
    class
        inherit ScriptNameObjectBase
        interface ICreatable
        interface IDroppable
        interface IMarkForDrop
        interface IAlterable
        interface IRenamable
        interface IExtendedProperties
        interface IScriptable
        interface IPropertyDataDispatch
    end
public final class ForeignKey extends ScriptNameObjectBase implements ICreatable, IDroppable, IMarkForDrop, IAlterable, IRenamable, IExtendedProperties, IScriptable, IPropertyDataDispatch

説明

ForeignKey オブジェクトのプロパティを取得するには、固定サーバー ロール public のメンバでもかまいません。

ForeignKey オブジェクトのプロパティを設定するには、親テーブルの ALTER 権限を持っているか、固定データベース ロール db_owner のメンバである必要があります。

外部キーを作成または削除するには、親テーブルの ALTER 権限を持っているか、固定データベース ロール db_owner のメンバである必要があります。

スレッド セーフ

この型の public static (Microsoft Visual Basic では Shared) のすべてのメンバーは、マルチスレッド操作で安全に使用できます。 インスタンス メンバーの場合は、スレッド セーフであるとは限りません。

スレッド セーフ

この型の public static (Visual Basic では Shared) のメンバーはすべて、スレッド セーフです。インスタンス メンバーの場合は、スレッド セーフであるとは限りません。