'Is there a way to change the table column name in TDengine?

I am using TDengine as my time-series storage engine and I want to change a column name of a super table. I tried to find a way in the official documents but I failed. Is there a way to change the column name of a super table?



Solution 1:[1]

Change column name is not supported in TDengine 2.x. TDengine 2.x supports add a new column, drop an existing column, change column length for binary/nchar column.

Solution 2:[2]

No, I'm afraid not. Currently TDengine 2.x does not support column name changing. You can

  1. Use alter to drop it and add a new column with the right name, but you may lost data.
  2. Use select col as col2 to use as you have a column col2, but does not work in inserts.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Xiao Ping
Solution 2 zitsen