> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SHOW VIEW

Outputs the DDL statement required to reconstruct the given
[view](/content/sql/ddl/create-view#sql-create-view) or
[materialized view](/content/sql/ddl/create-materialized-view#sql-create-materialized-view).

```sql title="SHOW VIEW Syntax" theme={null}
SHOW [[CREATE] VIEW] [<schema name>.]<view name> [WITH OPTIONS (<options>)]
```

<Tip>
  To show the *view*, along with all its base table dependencies (and its
  dependencies' dependencies, etc.), use:

  ```
  WITH OPTIONS ('dependencies' = 'true')
  ```

  Output will be in dependency-order, with dependencies listed before *views*
  that depend on them.  This allows the output to be run as a sequence of SQL
  commands to recreate the final *view* with all of its dependencies.
</Tip>

<Info>
  The response to `SHOW VIEW` is a single-record result set
  with the DDL statement as the value in the `DDL` column, shown below with
  the column separators returned by <Badge color="blue-destructive">kisql</Badge>.
</Info>

## Parameters

<AccordionGroup>
  <Accordion title="CREATE" id="create" defaultOpen>
    Optional keyword for clarity
  </Accordion>

  <Accordion title="VIEW" id="view" defaultOpen>
    Optional clause to avoid ambiguity:

    * if given, and a *table* with the given name exists instead, the command will return an error
    * if omitted, and a *table* with the given name exists instead, the command will be interpreted
      as a `SHOW TABLE` statement
  </Accordion>

  <Accordion title="<schema name>" id="<schema-name>" defaultOpen>
    Name of the *schema* containing the *view* to show
  </Accordion>

  <Accordion title="<view name>" id="<view-name>" defaultOpen>
    Name of the *view* whose DDL will be output
  </Accordion>

  <Accordion title="WITH OPTIONS" id="with-options" defaultOpen>
    Optional indicator that a comma-delimited list of connection option/value assignments will
    follow.

    All valid options from [Show Table](/content/api/rest/show_table_rest)
    can be used here.
  </Accordion>
</AccordionGroup>

## Examples

To output the DDL for the example *view* created in the
[CREATE VIEW](/content/sql/ddl/create-view#sql-create-view) section:

```sql SHOW VIEW Example theme={null}
SHOW VIEW example.view_of_table
```
