cassandra add column if not exists

前端 未结 1 1390
我寻月下人不归
我寻月下人不归 2021-02-07 05:59

I need to insert a new column into an existing column family via a CQL script.

I want to do something like:

alter COLUMNFAMILY rules ADD rule_template te         


        
相关标签:
1条回答
  • 2021-02-07 07:01

    There is no optional "if not exists" for altering column families (tables). As a workaround you could just execute the alter command and ignore the error if the column already exists. There shouldn't be any harm in it, other than the error message.

    0 讨论(0)
提交回复
热议问题