Adding columns to a table

Using the ALTER TABLE command to add new columns to a table.

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.