Tables プロパティ
名前空間: Microsoft.SqlServer.Management.Smo
アセンブリ: Microsoft.SqlServer.Smo (Microsoft.SqlServer.Smo.dll)
構文
'宣言
<SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny, _
GetType(Table))> _
Public ReadOnly Property Tables As TableCollection
Get
'使用
Dim instance As Database
Dim value As TableCollection
value = instance.Tables
[SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny,
typeof(Table))]
public TableCollection Tables { get; }
[SfcObjectAttribute(SfcContainerRelationship::ObjectContainer, SfcContainerCardinality::ZeroToAny,
typeof(Table))]
public:
property TableCollection^ Tables {
TableCollection^ get ();
}
[<SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny,
typeof(Table))>]
member Tables : TableCollection
function get Tables () : TableCollection
プロパティ値
型: Microsoft.SqlServer.Management.Smo. . :: . .TableCollection
データベースで定義されたすべてのテーブルを表す TableCollection オブジェクト。
使用例
'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server
'Reference the AdventureWorks database.
Dim db As Database
db = srv.Databases("AdventureWorks")
'Display all the tables in the database.
Dim tb As Table
For Each tb In db.Tables
Console.WriteLine(tb.Name)
Next