ALTER TABLE¶
ALTER TABLE
can be used to make schema changes to a table. It works in conjunction with several subcommands.
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¶
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 |