Skip to main content

DROP DOMAIN

Turso Extension: DROP DOMAIN is a Turso-specific statement not available in standard SQLite. This feature is experimental and must be enabled before use.
The DROP DOMAIN statement removes a user-defined domain from the database. Once dropped, the domain name can no longer be used in new column definitions.

Syntax

Description

DROP DOMAIN removes the named domain from the database. The domain must exist unless the IF EXISTS clause is specified.

Clauses

Restrictions

A domain cannot be dropped while any table column uses it or while another domain references it as a base type. Remove all dependents before dropping.

DROP DOMAIN vs DROP TYPE

DROP DOMAIN can only remove domains created with CREATE DOMAIN. Attempting to use DROP DOMAIN on a type created with CREATE TYPE results in an error, and vice versa.

Examples

Drop a Domain

Drop with IF EXISTS

Drop After Removing Table Dependency

See Also