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 COLUMN

Add a new column to a table

DROP COLUMN

Drop a column from a table

RENAME COLUMN

Rename a column

RENAME TABLE

Rename a table

CLUSTER BY

Modify (add or reorder) the clustering keys in a table

DROP CLUSTERING KEY

Drop all clustering keys