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

# DROP TABLE

> Use the `DROP TABLE` command to remove a table from the database.

Before you can remove a table, you must remove all its dependent objects (indexes, materialized views, etc.).

## Syntax

```sql theme={null}
DROP TABLE [ IF EXISTS ] [schema_name.]table_name [ CASCADE ];
```

## Parameters

| Parameter          | Description                                                                                                                                                                                                                                                           |
| :----------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *schema*           | Specify the name of a schema to remove the table in that schema. You can use [SHOW SCHEMAS](/sql/commands/sql-show-schemas) to get a list of all available schemas. If you don't specify a schema, the specified source in the default schema public will be removed. |
| *table*            | The name of the table to remove. You can use [SHOW TABLES](/sql/commands/sql-show-tables) to get a list of all available tables.                                                                                                                                      |
| **CASCADE** option | If this option is specified, all objects (such as materialized views) that depend on the table, and in turn all objects that depend on those objects will be dropped.                                                                                                 |

## Examples

This statement removes the `taxi_trips` table in the default schema (`public`) from the database:

```sql theme={null}
DROP TABLE taxi_trips;
```

This statement removes the `taxi_trips` table in the `rw_schema` schema from the database:

```sql theme={null}
DROP TABLE IF EXISTS rw_schema.taxi_trips;
```

## Hanging or long running `DROP TABLE`

If your `DROP TABLE` command takes a long time to run, it could be due to high barrier latency. `DROP` commands need to be synchronized with barriers currently. To let `DROP` take effect immediately, you can use the `RECOVER` command in a separate session.
