ALTER VIEW

Function

ALTER VIEW modifies all auxiliary attributes of a view. (To modify the query definition of a view, use CREATE OR REPLACE VIEW.)

Precautions

Syntax

Parameter Description

Examples

Rename a view.

1
ALTER VIEW tpcds.customer_details_view_v1 RENAME TO customer_details_view_v2;

Change the schema of a view.

1
ALTER VIEW tpcds.customer_details_view_v2 SET schema public;

Rebuild a view.

1
ALTER VIEW public.customer_details_view_v2 REBUILD;

Rebuild a dependent view.

1
ALTER VIEW ONLY public.customer_details_view_v2 REBUILD;

Helpful Links

CREATE VIEW, DROP VIEW