ALTER TABLE¶
ALTER TABLE
can be used to make schema changes to a table. It works in conjunction with several subcommands.
Overview¶
The ALTER TABLE page describes the following:
Locks¶
Schema changes take an exclusive lock on tables. While these operations are usually short, other statements may have to wait until the schema changes are completed.
Subcommands¶
The following table shows the subcommands:
Command |
Usage |
---|---|
Add a new column to a table |
|
Drop a column from a table |
|
Rename a column |
|
Rename a table |
|
Modify (add or reorder) the clustering keys in a table |
|
Drop all clustering keys |