Adding New Hash Columns to an Existing Table

Hi all,

I’d like to add new columns to an existing COLUMNSTORE table, yet wasn’t sure if it’s also possible to add those new columns as hashes with the USING HASH definition.

My current table is very simple:

CREATE TABLE tbl_data (row INT, data TEXT, KEY(row) USING CLUSTERED COLUMNSTORE, SHARD KEY (data), KEY(data) USING HASH);

Thanks

You can add the columns, then create hash indexes on them afterwards with CREATE INDEX. E.g.

create index idx1 on orders(d) using hash;

Thank you @hanson! That worked