Skip to content

Commit

Permalink
Merge pull request #4016 from szarnyasg/alter-table-limitation
Browse files Browse the repository at this point in the history
Add ALTER TABLE limitation
  • Loading branch information
szarnyasg authored Nov 4, 2024
2 parents 4821f17 + c91f084 commit 599bb5e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/sql/statements/alter_table.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down

0 comments on commit 599bb5e

Please sign in to comment.