Get-SqlColumn

Gets an SMO Column object.

Syntax

Get-SqlColumn [-table] <Object> [<CommonParameters>]

Detailed Description

The Get-SqlColumn function gets a collection of SMO Column objects for the specified table or view.

Related Commands

* Get-SqlColumn

Parameters

Name Description Required? Pipeline Input Default Value
table    true  true (ByValue)   

Input Type

Microsoft.SqlServer.Management.Smo.Table or Microsoft.SqlServer.Management.Smo.View You can pipe SMO objects to Get-SqlColumn

Return Values

Microsoft.SqlServer.Management.Smo.Column Get-SqlColumn returns a Microsoft.SqlServer.Management.Smo.Column object.

Notes

Additional properties including the database, server and extended properties are included in the output.

Examples

EXAMPLE 1

Get-SqlDatabase "Z002\sql2k8" "pubs" | Get-SqlTable -name "authors" | Get-SqlColumn
This command gets a collection of SMO Column objects for the authors table.