From the course: SQL Essential Training

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Deleting views

Deleting views

So we've looked at creating a view, we've looked at modifying a view, now let's take a look at deleting it. As you may have guessed, an easy way to do this is by going to our database structure and when we right click, it was hard not to notice the last option here, which is to delete a view. And this is one of the ways that we could actually simply delete a view. Now I can hit delete view. We do get a confirmation message and we could just simply confirm that. I'm not gonna do that just yet. I'm gonna hit no for now. Take a note of our view, V average total. I'm gonna head over to the execute SQL tab and show you one more way that we could actually delete a view via SQL syntax. And that is the keyword drop. And we want to specify that we are dropping a view. So we say view. And next, we want to simply state the view name that we would like to drop. And we want to drop our V underscore AVG. And there is IntelliSense saving us some typing. And I just select V average total. And now if…

Contents