> ## 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 INDEX

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

## Syntax

```sql theme={null}
SHOW CREATE INDEX index_name;
```

## Parameters

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

## Example

We can create a table `t3` and an index `idx1` on `t3`.

```sql theme={null}
CREATE TABLE IF NOT EXISTS t3 (
    v1 int,
    v2 int,
    v3 int);

CREATE INDEX idx1 ON t3 (v1,v2);
```

Next, we can use the `SHOW CREATE INDEX` command on `idx1` to see the query used.

```sql theme={null}
SHOW CREATE INDEX idx1;
```

```sql theme={null}
    Name     |           Create Sql
-------------+---------------------------------
 public.idx1 | CREATE INDEX idx1 ON t3(v1, v2)
(1 row)
```

## Related topics

<CardGroup>
  <Card title="CREATE INDEX" icon="database" iconType="solid" href="/sql/commands/sql-create-index" horizontal />
</CardGroup>
