Menu
Amazon Athena
User Guide

DROP TABLE

Removes the metadata table definition for the table named table_name. When you drop an external table, the underlying data remains intact because all tables in Athena are EXTERNAL.

Synopsis

DROP TABLE [IF EXISTS] table_name [PURGE]

Parameters

[ IF EXISTS ]

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

[ PURGE ]

Applies to managed tables. Ignored for external tables. Specifies that data should be removed permanently rather than being moved to the .Trash/Current directory.

Examples

DROP TABLE fulfilled_orders;
DROP TABLE IF EXISTS fulfilled_orders PURGE;

On this page: