title: "SHOW CREATE VIEW"
description: "SHOW CREATE VIEW
returns the SELECT
statement used to create the view."
menu:
main:
parent: commands
SHOW CREATE VIEW
returns the SELECT
statement used to create the view.
SHOW [REDACTED] CREATE VIEW <view_name>
{{< yaml-table data="show_create_redacted_option" >}}
For available view names, see SHOW VIEWS
.
SHOW CREATE VIEW my_view;
name | create_sql
----------------------------+--------------------------------------------------------------------------------------------------
materialize.public.my_view | CREATE VIEW "materialize"."public"."my_view" AS SELECT * FROM "materialize"."public"."my_source"
The privileges required to execute this statement are:
{{< include-md file="shared-content/sql-command-privileges/show-create-view.md"
}}