Documentation — Commands reference
alter table describes a table in the dictionary. Before the table is deployed you use it to prepare the deployment; afterwards almost every form is refused.
alter table TABLE_NAME add [column] COL_NAME COL_TYPE [, add [column] COL_NAME COL_TYPE ...];
alter table TABLE_NAME drop column COL_NAME;
empty or wide. A table created with a column list cannot be altered: recreate it with the new definition.alter table TABLE_NAME set datacenter 'DC1';
alter table TABLE_NAME set hash key COL_1 [, COL_2 ...];
alter table TABLE_NAME set replicates 1 | 2 | 3;
alter table TABLE_NAME set rrpc N;
alter table TABLE_NAME set empty;
set datacenter: mandatory, there is no default. The name is between quotes. It can change as long as the table is not deployed.set hash key: mandatory. The columns, in order, make the hash key (see Partitioning).set replicates: number of copies, 1 by default.set rrpc: for a wide table, how many rows per chunk are reserved when the chunks are built (1 to 999). Leave the default unless you know why.set empty: removes all the columns of a table that is not deployed.alter table TABLE_NAME set segments up;
For a table with one copy, brings up the segments that were declared out of date after a crash and for which you recovered the data. A table with several copies is repaired with repair table.
ALTER on the table (the owner has it).