Get-SqlInformation_Schema.Tables
Returns the result set from INFORMATION_SCHEMA.Tables for the specified database(s).
Syntax
Get-SqlInformation_Schema.Tables [-database] <Database> [[-name] <String>] [<CommonParameters>]
Detailed Description
The Get-SqlInformation_Schema.Tables function returns the result set from Information_Schema.Tables for the specified database(s).
Related Commands
Parameters
Name |
Description |
Required? |
Pipeline Input |
Default Value |
database |
|
true |
true (ByValue) |
|
name |
|
false |
false |
|
Input Type
Microsoft.SqlServer.Management.Smo.Database
You can pipe Database objects to Get-SqlInformation_Schema.Tables
Return Values
System.Data.DataRow
Get-SqlInformation_Schema.Tables returns an array of System.Data.DataRow.
Examples
EXAMPLE 1
Get-SqlDatabase "Z002\sql2k8" "pubs" | Get-Information_Schema.Tables
This command returns the result set from INFORMATION_SCHEMA.Tables for the pubs database.
EXAMPLE 2
Get-SqlDatabase "Z002\sql2k8" "pubs" | Get-Information_Schema.Tables -name "authors"
This command returns the result set from INFORMATION_SCHEMA.Tables for the pubs database where the table name is like authors.