Adds the rowguidcol property to a column in a table.
Add-RowGuidCol [-SchemaName <String>] [-TableName] <String> [-ColumnName] <String> [<CommonParameters>]
The Add-RowGuidCol operation adds the rowguidcol property to a uniqueidentifier column in a table. A table can only have one rowguidcol column. If a table has an existing rowguidcol column, use Remove-RowGuidCol to remove it before adding a new one.
The Add-RowGuidCol operation was added in Rivet 0.7.
| Name | Type | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| SchemaName | String | The table's schema. Default is |
false | false | dbo |
| TableName | String | The table's name. |
true | false | |
| ColumnName | String | The name of the column that should get the |
true | false |
Add-RowGuidCol -TableName 'MyTable' -ColumnName 'MyUniqueIdentifier'
Demonstrates how to add the rowguidcol property to a column in a table. In this example, the dbo.MyTable table's MyUniqueIdentifier column will get the propery.
Add-RowGuidCol -SchemaName 'cstm' -TableName 'MyTable' -ColumnName 'MyUniqueIdentifier'
Demonstrates how to add the rowguidcol property to a column in a table whose schema isn't dbo, in this case the cstm.MyTable table's MyUniqueIdentifier column will get the property.