Removes a view.
Remove-View [-Name] <String> [[-SchemaName] <String>] [<CommonParameters>]
Removes a view. Will throw an exception and rollback the migration if the view doesn't exist.
By default, the view is assumed to be in the dbo
schema. Use the Schema
parameter to specify a different schema.
You can conditionally delete a view only if it exists using the IfExists
switch.
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Name | String | The name of the view to remove/delete. |
true | false | |
SchemaName | String | The schema of the view. Default is |
false | false | dbo |
Remove-View -Name MyView
Removes the dbo.MyView
view.
Remove-View -Name MyView -SchemaName rivet
Removes the rivet.MyView
view.