Summary -

In this topic, we described about the DELETE VIEW with detailed example.

In some situations, we may require delete the view that there is no further use in future or that may create mistakenly. By using DROP VIEW statement, we can delete the existing view.

Syntax -

DROP VIEW view_name; 
  • view_name – Specifies the name of the existing view.

Example -

Let us consider we have existing view named as employee_v.

Scenario – Delete existing view.

Requirement - Delete existing view employee_v. The query was as follows –

DROP VIEW employee_info; 

By executing above query, we can delete the existing view.


Scenario – Verifying view was deleted or not.

Requirement - Verifying employee_v view was deleted or not.

SELECT FROM employee_v; 

By executing above query, we could get error like 'invalid object employee_v' if the view gets deleted. Otherwise, employee_v rows gets displayed.