SQL DROP VIEW Keyword
The DROP VIEW command deletes a view from the database.
SQL DROP VIEW Syntax
SQL
x
1
DROP VIEW view_name
SQL DROP VIEW Example
Before you can drop a view, you must first create it. In our TechKubo playground, views are not permanent — they are deleted when the browser or tab is refreshed. Below is a full example of how to create and drop a view using the Patients table:
Step 1: Create a View (must be done in the same session)
SQL
1
1
CREATE VIEW FemalePatientNames AS
2
SELECT first_name, last_name
3
FROM Patients
4
WHERE gender = 'F'

Step 2: Drop the View
SQL
1
1
DROP VIEW FemalePatientNames
