Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

DROP DATABASE

Focus mode
DROP DATABASE - Amazon Athena

Removes the named database from the catalog. If the database contains tables, you must either drop the tables before running DROP DATABASE or use the CASCADE clause. The use of DATABASE and SCHEMA are interchangeable. They mean the same thing.

Synopsis

DROP {DATABASE | SCHEMA} [IF EXISTS] database_name [RESTRICT | CASCADE]

Parameters

[IF EXISTS]

Causes the error to be suppressed if database_name doesn't exist.

[RESTRICT|CASCADE]

Determines how tables within database_name are regarded during the DROP operation. If you specify RESTRICT, the database is not dropped if it contains tables. This is the default behavior. Specifying CASCADE causes the database and all its tables to be dropped.

Examples

DROP DATABASE clickstreams;
DROP SCHEMA IF EXISTS clickstreams CASCADE;
Note

When you try to drop a database whose name has special characters (for example, my-database), you may receive an error message. To resolve this issue, try enclosing the database name in back tick (`) characters. For information about naming databases in Athena, see Name databases, tables, and columns.

On this page

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.