For the complete documentation index, see llms.txt. This page is also available as Markdown.

DROP RELATION

Synopsis

DROP RELATION relation_name;

Description

Drops an existing relation. Only the owner of the relation can execute this statement.

Notes

  • Deleting the relation does not delete the relation's underlying entity.

  • You cannot drop a relation if there exist any references to that relation.

Arguments

relation_name

The name of the relation to drop. If the name is case-sensitive, you must wrap it in double quotes; otherwise, the system uses the lower case name.

Example

Drop a relation using default database and schema

The following shows how to drop the relation named pageviews:

Drop a relation using fully-qualified name

The following shows how to drop the relation named PageViews in the database OtherDB and schema S1:

Last updated