# SHOW CREATE TABLE
`SHOW CREATE TABLE` returns the SQL used to create the table.

> For the complete documentation index, see [llms.txt](https://preview.materialize.com/materialize/40269/llms.txt).


`SHOW CREATE TABLE` returns the SQL used to create the table.

## Syntax

```sql
SHOW [REDACTED] CREATE TABLE <table_name>;
```


| Syntax element | Description |
| --- | --- |
| <strong>REDACTED</strong> | If specified, literals will be redacted. |


For available table names, see [`SHOW TABLES`](https://preview.materialize.com/materialize/40269/markdown-docs/sql/show-tables/index.md).

## Examples

```mzsql
CREATE TABLE t (a int, b text NOT NULL);
```

```mzsql
SHOW CREATE TABLE t;
```
```nofmt
         name         |                                             create_sql
----------------------+-----------------------------------------------------------------------------------------------------
 materialize.public.t | CREATE TABLE "materialize"."public"."t" ("a" "pg_catalog"."int4", "b" "pg_catalog"."text" NOT NULL)
```

## Privileges

The privileges required to execute this statement are:

- `USAGE` privileges on the schema containing the table.

## Related pages

- [`SHOW TABLES`](https://preview.materialize.com/materialize/40269/markdown-docs/sql/show-tables/index.md)
- [`CREATE TABLE`](https://preview.materialize.com/materialize/40269/markdown-docs/sql/create-table/index.md)
