Adding columns to a table

Adding columns to a table with the ALTER TABLE command.

The ALTER TABLE command adds new columns to a table.


Add a coupon_code column with the varchar data type to the users table.
cqlsh:demodb> ALTER TABLE users ADD coupon_code varchar;
This creates the column metadata and adds the column to the table schema, but does not update any existing rows.