HasUpdateTrigger 속성
테이블에 Update 트리거가 있는지 여부를 지정하는 Boolean 속성 값을 가져옵니다.
네임스페이스: Microsoft.SqlServer.Management.Smo
어셈블리: Microsoft.SqlServer.Smo(Microsoft.SqlServer.Smo.dll)
구문
‘선언
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase)> _
Public ReadOnly Property HasUpdateTrigger As Boolean
Get
‘사용 방법
Dim instance As Table
Dim value As Boolean
value = instance.HasUpdateTrigger
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)]
public bool HasUpdateTrigger { get; }
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::Standalone|SfcPropertyFlags::SqlAzureDatabase)]
public:
property bool HasUpdateTrigger {
bool get ();
}
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)>]
member HasUpdateTrigger : bool
function get HasUpdateTrigger () : boolean
속성 값
유형: System. . :: . .Boolean
테이블에 Update 트리거가 정의되어 있는지 여부를 지정하는 Boolean 값입니다.
True 이면 테이블에 Update 트리거가 정의되어 있고, 그렇지 않으면 False(기본값)입니다.
주의
An update trigger executes when a row of data is updated.
예
The following code example shows how to list each table in the AdventureWorks2008R2 database with an update trigger.
C#
Server srv = new Server("(local)");
Database db = srv.Databases["AdventureWorks2008R2"];
foreach (Table tb in db.Tables)
{
if (tb.HasUpdateTrigger == true)
{
Console.WriteLine("The " + tb.Name + " table has an update trigger");
}
}
Powershell
$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$db = New-Object Microsoft.SqlServer.Management.Smo.Database
$db = $srv.Databases.Item("AdventureWorks2008R2")
Foreach ($tb in $db.Tables)
{
If ($tb.HasUpdateTrigger -eq $TRUE)
{
Write-Host "The" $tb.Name "table has an update trigger."
}
}