数据仓库服务 GAUSSDB(DWS)-ALTER VIEW:示例

时间:2024-10-21 16:50:36

示例

修改视图名称:

1
ALTER VIEW tpcds.customer_details_view_v1 RENAME TO customer_details_view_v2;

修改视图名称,新视图名前带有原视图所在的schema名:

1
ALTER VIEW tpcds.customer_details_view_v1 RENAME TO tpcds.customer_details_view_v2;

修改视图所属schema:

1
ALTER VIEW tpcds.customer_details_view_v2 SET schema public;

重建视图:

1
ALTER VIEW public.customer_details_view_v2 REBUILD;

重建依赖视图:

1
ALTER VIEW ONLY public.customer_details_view_v2 REBUILD;
support.huaweicloud.com/sqlreference-830-dws/dws_06_0150.html