Oracle: DROP VIEW

To create VIEW in Oracle, click here. Along with that, in the previous article we discussed about alter view.

Now after the creation of a view, that act as a virtual table, let's discuss about the way to delete an already created view. You can follow below the syntax to drop a particular view:

Syntax

Drop View View_name;

Example

You have a following table, Stu:

Stu Table

Now, let's create a view named less_than and store all the values into it with Roll_no leass than 40. Below shown is the code that performs the same task:

Create view Less_than as 
select * from stu where Roll_no<40;

You will notice that Less_than view is actually created.

Now, It is found that the criteria of attaining marks for students have been changed. However, This view needs to be deleted. to to delete the view follow the code below:

drop view less_than;

Output

less_than