drop view

Description

Removes one or more views from the current database.

Syntax

drop view [owner.]view_name [, [owner.]view_name] ...

Parameters

view_name

is the name of the view to drop. Specify the owner’s name to drop a view of the same name owned by a different user in the current database. The default value for owner is the current user.

Examples

Example 1

Removes the view new_price from the current database:

drop view new_price

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

drop view permission defaults to the view owner and is not transferable.

Auditing

Values in event and extrainfo columns of sysaudits are:

Event

Audit option

Command or access audited

Information in extrainfo

33

drop

drop view

  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – NULL

See also

Commands create view

System procedures sp_depends, sp_help, sp_helptext