SHOW CREATE VIEW

SHOW CREATE VIEW returns the SELECT statement used to create the view.

Syntax

SHOW CREATE VIEW <view_name>

For available view names, see SHOW VIEWS.

Examples

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"

Privileges

The privileges required to execute this statement are:

  • USAGE privileges on the schema containing the view.
Back to top ↑