Get-SqlInformation_Schema.Columns

Returns the result set from INFORMATION_SCHEMA.Columns for the specified database(s).

Syntax

Get-SqlInformation_Schema.Columns [-database] <Database> [[-tblname] <String>] [[-colname] <String>] [<CommonParameters>]

Detailed Description

The Get-SqlInformation_Schema.Columns function returns the result set from Information_Schema.Columns for the specified database(s).

Related Commands

* Get-SqlInformation_Schema.Columns

Parameters

Name Description Required? Pipeline Input Default Value
database    true  true (ByValue)   
tblname    false  false   
colname    false  false   

Input Type

Microsoft.SqlServer.Management.Smo.Database You can pipe Database objects to Get-SqlInformation_Schema.Columns

Return Values

System.Data.DataRow Get-SqlInformation_Schema.Columns returns an array of System.Data.DataRow.

Examples

EXAMPLE 1

Get-SqlDatabase "Z002\sql2k8" "pubs" | Get-Information_Schema.Columns
This command returns the result set from INFORMATION_SCHEMA.Columns for the pubs database.

EXAMPLE 2

Get-SqlDatabase "Z002\sql2k8" "pubs" | Get-Information_Schema.Columns -tblname "authors" -colname "au_fname"
This command returns the result set from INFORMATION_SCHEMA.Columns for the pubs database where the table name is like authors and the column name is like au_fname.