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

# SHOW CREATE TABLE

> Use the `SHOW CREATE TABLE` command to see what query was used to create the specified table.

## Syntax

```sql theme={null}
SHOW CREATE TABLE table_name;
```

## Parameters

| Parameter     | Description                     |
| :------------ | :------------------------------ |
| *table\_name* | The table to show the query of. |

## Example

```sql theme={null}
CREATE TABLE IF NOT EXISTS taxi_trips(
    id VARCHAR,
    distance DOUBLE PRECISION,
    city VARCHAR
) WITH (appendonly = 'true');

SHOW CREATE TABLE taxi_trips;
```

Here is the result. Note that the `IF NOT EXISTS` clause is omitted while the `WITH` option is preserved.

```sql theme={null}
   Name    |                 Create Sql
-----------+---------------------------------------------
 public.taxi_trips | CREATE TABLE taxi_trips (id CHARACTER VARYING, distance DOUBLE, city CHARACTER VARYING) WITH (appendonly = 'true')
(1 row)
```

## Related topics

<CardGroup>
  <Card title="SHOW CREATE MATERIALIZED VIEW" icon="eye" iconType="solid" href="/sql/commands/sql-show-create-mv" />

  <Card title="SHOW CREATE VIEW" icon="eye" iconType="solid" href="/sql/commands/sql-show-create-view" />
</CardGroup>
