Update-View

Updates an existing view.

Syntax

Update-View [-Name] <String> [-SchemaName <String>] [-Definition] <String> [<CommonParameters>]

Description

Updates an existing view.

Related Commands

Parameters

Name Type Description Required? Pipeline Input Default Value
Name String

The name of the view.

true false
SchemaName String

The schema name of the view. Defaults to dbo.

false false dbo
Definition String

The definition of the view. Everything after the alter view [schema].[name] clause.

true false

EXAMPLE 1

Update-View -SchemaName 'rivet' 'ReadMigrations' 'AS select * from rivet.Migrations'

Updates a view to read all the migrations from Rivet's Migrations table. Don't do this in real life.