DROP VIEW forcibly deletes an existing view in a database.
Only a view owner or a system administrator can run DROP VIEW command.
1 | DROP VIEW [ IF EXISTS ] view_name [, ...] [ CASCADE | RESTRICT ]; |
Sends a notice instead of an error if the specified view does not exist.
Specifies the name of the view to be deleted.
Value range: An existing view.
Delete the myView view.
1 | DROP VIEW myView; |
Delete the customer_details_view_v2 view.
1 | DROP VIEW public.customer_details_view_v2; |