--- title: "DROP VIEW (Transact-SQL)" description: DROP VIEW (Transact-SQL) author: WilliamDAssafMSFT ms.author: wiassaf ms.date: "01/19/2021" ms.service: sql ms.subservice: t-sql ms.topic: reference f1_keywords: - "DROP_VIEW_TSQL" - "DROP VIEW" helpviewer_keywords: - "dropping views" - "DROP VIEW statement" - "deleting views" - "indexed views [SQL Server], removing" - "views [SQL Server], removing" - "removing views" dev_langs: - "TSQL" monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current" --- # DROP VIEW (Transact-SQL) [!INCLUDE [sql-asdb-asdbmi-asa-pdw](../../includes/applies-to-version/sql-asdb-asdbmi-asa-pdw.md)] Removes one or more views from the current database. DROP VIEW can be executed against indexed views. ![Topic link icon](../../database-engine/configure-windows/media/topic-link.gif "Topic link icon") [Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md) ## Syntax ```syntaxsql -- Syntax for SQL Server and Azure SQL Database DROP VIEW [ IF EXISTS ] [ schema_name . ] view_name [ ...,n ] [ ; ] ``` ```syntaxsql -- Syntax for Azure Synapse Analytics DROP VIEW [ IF EXISTS ] [ schema_name . ] view_name [ ; ] ``` ```syntaxsql -- Syntax for Parallel Data Warehouse DROP VIEW [ schema_name . ] view_name [ ; ] ``` [!INCLUDE[sql-server-tsql-previous-offline-documentation](../../includes/sql-server-tsql-previous-offline-documentation.md)] ## Arguments *IF EXISTS* **Applies to**: [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] ( [!INCLUDE[sssql16-md](../../includes/sssql16-md.md)] through [current version](/troubleshoot/sql/general/determine-version-edition-update-level), [!INCLUDE[sssds](../../includes/sssds-md.md)]). Conditionally drops the view only if it already exists. *schema_name* Is the name of the schema to which the view belongs. *view_name* Is the name of the view to remove. ## Remarks When you drop a view, the definition of the view and other information about the view is deleted from the system catalog. All permissions for the view are also deleted. Any view on a table that is dropped by using DROP TABLE must be dropped explicitly by using DROP VIEW. When executed against an indexed view, DROP VIEW automatically drops all indexes on a view. To display all indexes on a view, use [sp_helpindex](../../relational-databases/system-stored-procedures/sp-helpindex-transact-sql.md). When querying through a view, the [!INCLUDE[ssDE](../../includes/ssde-md.md)] checks to make sure that all the database objects referenced in the statement exist and that they are valid in the context of the statement, and that data modification statements do not violate any data integrity rules. A check that fails returns an error message. A successful check translates the action into an action against the underlying table or tables. If the underlying tables or views have changed since the view was originally created, it may be useful to drop and re-create the view. For more information about determining dependencies for a specific view, see [sys.sql_dependencies (Transact-SQL)](../../relational-databases/system-catalog-views/sys-sql-dependencies-transact-sql.md). For more information about viewing the text of the view, see [sp_helptext (Transact-SQL)](../../relational-databases/system-stored-procedures/sp-helptext-transact-sql.md). ## Permissions Requires **CONTROL** permission on the view, **ALTER** permission on the schema containing the view, or membership in the **db_ddladmin** fixed server role. ## Examples ### A. Drop a view The following example removes the view `Reorder`. ```sql DROP VIEW IF EXISTS dbo.Reorder ; GO ``` ## See Also [ALTER VIEW (Transact-SQL)](../../t-sql/statements/alter-view-transact-sql.md) [CREATE VIEW (Transact-SQL)](../../t-sql/statements/create-view-transact-sql.md) [EVENTDATA (Transact-SQL)](../../t-sql/functions/eventdata-transact-sql.md) [sys.columns (Transact-SQL)](../../relational-databases/system-catalog-views/sys-columns-transact-sql.md) [sys.objects (Transact-SQL)](../../relational-databases/system-catalog-views/sys-objects-transact-sql.md) [USE (Transact-SQL)](../../t-sql/language-elements/use-transact-sql.md) [sys.sql_expression_dependencies (Transact-SQL)](../../relational-databases/system-catalog-views/sys-sql-expression-dependencies-transact-sql.md)