Removes one or more views from the current database.
drop view [owner.]view_name [, [owner.]view_name] ...
drop view new_price
When you use drop view, the definition of the view and other information about it, including privileges, is deleted from the system tables sysobjects, syscolumns, syscomments, sysdepends, sysprocedures, and sysprotects.
Existence of a view is checked each time the view is referenced, for example, by another view or by a stored procedure.
See also sp_depends, sp_help, sp_helptext in Reference Manual: Procedures.
ANSI SQL – Compliance level: Transact-SQL extension.
The permission checks for drop view differ based on your granular permissions settings.
Setting | Description |
---|---|
Enabled | With granular permissions enabled, you must be the view owner or a user with drop any view privilege. |
Disabled | With granular permissions disabled, you must be the view owner or a user with sa_role. |
Values in event and extrainfo columns of sysaudits are:
Information | Values |
---|---|
Event | 33 |
Audit option | drop |
Command or access audited | drop view |
Information in extrainfo |
|