ID 속성
테이블을 고유하게 식별하는 ID 값을 가져옵니다.
네임스페이스: Microsoft.SqlServer.Management.Smo
어셈블리: Microsoft.SqlServer.Smo(Microsoft.SqlServer.Smo.dll)
구문
‘선언
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase)> _
Public ReadOnly Property ID As Integer
Get
‘사용 방법
Dim instance As Table
Dim value As Integer
value = instance.ID
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)]
public int ID { get; }
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::Standalone|SfcPropertyFlags::SqlAzureDatabase)]
public:
virtual property int ID {
int get () sealed;
}
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)>]
abstract ID : int
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)>]
override ID : int
final function get ID () : int
속성 값
유형: System. . :: . .Int32
테이블을 고유하게 식별하는 ID 값을 지정하는 Int32 값입니다.
구현
예
The following code example shows how to list the ID value of each table in the AdventureWorks2008R2 database.
C#
Server srv = new Server("(local)");
Database db = srv.Databases["AdventureWorks2008R2"];
foreach (Table tb in db.Tables)
{
Console.WriteLine("The ID of the " + tb.Name + " table is " + tb.ID.ToString());
}
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)
{
Write-Host "The ID of the" $tb.Name "table is" $tb.ID
}