Categories:
Data Loading / Unloading DDL

DROP STAGE

Removes the specified named internal or external stage from the current/specified schema. The status of the files in the stage depends on the stage type:

  • For an internal stage, all of the files in the stage are purged from Snowflake, regardless of their load status. This prevents the files from continuing to using storage and, consequently, accruing storage charges. However, this also means that the staged files cannot be recovered after a stage is dropped.
  • For an external stage, only the stage itself is dropped; any data files in the referenced external location (i.e. S3 bucket or Azure container) are not removed.
See also:
CREATE STAGE , SHOW STAGES

Syntax

DROP STAGE [ IF EXISTS ] <name>

Parameters

name
Specifies the identifier for the stage to drop. If the identifier contains spaces, special characters, or mixed-case characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.

Usage Notes

  • Dropped stages cannot be recovered; they must be recreated.
  • This command cannot be used to drop the stage associated with a table or user; only named stages (internal or external) can be dropped.

Examples

DROP STAGE my_stage;

--------------------------------+
             status             |
--------------------------------+
 MY_STAGE successfully dropped. |
--------------------------------+