From c91f0848d14fb5f48f5bf5138da934831da48c11 Mon Sep 17 00:00:00 2001 From: Gabor Szarnyas Date: Mon, 4 Nov 2024 15:05:52 +0100 Subject: [PATCH] Add ALTER TABLE limitation --- docs/sql/statements/alter_table.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/sql/statements/alter_table.md b/docs/sql/statements/alter_table.md index b9277bac820..a2c5e11e939 100644 --- a/docs/sql/statements/alter_table.md +++ b/docs/sql/statements/alter_table.md @@ -126,6 +126,11 @@ ALTER TABLE integers DROP k; ``` The `DROP COLUMN` clause can be used to remove a column from a table. Note that columns can only be removed if they do not have any indexes that rely on them. This includes any indexes created as part of a `PRIMARY KEY` or `UNIQUE` constraint. Columns that are part of multi-column check constraints cannot be dropped either. +If you attempt to drop a column with an index on it, DuckDB will return the following error message: + +```console +Dependency Error: Cannot alter entry "..." because there are entries that depend on it. +``` ## `ALTER TYPE`