Deleting a View
Function
This statement is used to delete views.
Syntax
1
|
DROP VIEW [IF EXISTS] [db_name.]view_name; |
Keyword
DROP: Deletes the metadata of a specified view. Although views and tables have many common points, the DROP TABLE statement cannot be used to delete views.
Precautions
The to-be-deleted view must exist. If you run this statement to delete a view that does not exist, an error is reported. To avoid such an error, you can add IF EXISTS in this statement.
Example
To delete a view named student_view, run the following statement:
1
|
DROP VIEW student_view; |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot