---
title: DROP VIEW
description: Remove the metadata of a view from the catalog with DROP VIEW in Databricks SQL and Databricks Runtime.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-drop-view
---

# DROP VIEW

**Applies to:** ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks SQL ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks Runtime

Removes the metadata associated with a specified view from the catalog.
To drop a view you must have the `MANAGE` privilege on the view, be its owner, or the owner of the schema, catalog, or metastore the view resides in.

When you drop a Unity Catalog metric view, Databricks also deletes the [relationships](https://docs.databricks.com/aws/en/uc-semantics/metric-views/relationships.md) (Beta) declared on it. Relationships from other metric views to the dropped metric view no longer appear in `DESCRIBE TABLE EXTENDED` or `INFORMATION_SCHEMA.TABLE_CONSTRAINTS`.

## Syntax

```
DROP [ MATERIALIZED ] VIEW [ IF EXISTS ] view_name
```

## Parameter

* **IF EXISTS**

  If specified, no [TABLE\_OR\_VIEW\_NOT\_FOUND](https://docs.databricks.com/aws/en/error-messages/table-or-view-not-found-error-class.md) error is thrown when the view does not exist.

* **[view\_name](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-names.md#view-name)**

  The name of the view to be dropped.
  If the view cannot be found Databricks raises a [TABLE\_OR\_VIEW\_NOT\_FOUND](https://docs.databricks.com/aws/en/error-messages/table-or-view-not-found-error-class.md) error.
  If the relation found is not a view Databricks raises a [WRONG\_COMMAND\_FOR\_OBJECT\_TYPE](https://docs.databricks.com/aws/en/error-messages/error-classes.md#wrong_command_for_object_type) error.

## Examples

```sql
-- Assumes a view named `employeeView` exists.
> DROP VIEW employeeView;

-- Assumes a view named `employeeView` exists in the `usersc` schema
> DROP VIEW usersc.employeeView;

-- Assumes a view named `employeeView` does not exist.
-- Throws TABLE_OR_VIEW_NOT_FOUND
> DROP VIEW employeeView;
  [TABLE_OR_VIEW_NOT_FOUND]

-- Assumes a materialized view named `employeeView` exists.
> DROP MATERIALIZED VIEW employeeView

-- Assumes a view named `employeeView` does not exist. Try with IF EXISTS
-- this time it will not throw exception
> DROP VIEW IF EXISTS employeeView;
```

## Related articles

* [CREATE VIEW](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-create-view.md)
* [ALTER VIEW](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-alter-view.md)
* [SHOW VIEWS](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-show-views.md)
* [CREATE SCHEMA](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-create-schema.md)
* [DROP SCHEMA](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-drop-schema.md)
* [Object storage lifecycle in Unity Catalog](https://docs.databricks.com/aws/en/data-governance/unity-catalog/object-storage-lifecycle.md)
