sqltdengine

How to insert special characters in TDengine?


I tried to create a table using the following sql clause but syntax error is reported. I suspect the columns like "x-axis" "y-axis" have special character hypen in their names, but how can I make TDengine accept special characters in column names?

taos> create table tt (ts timestamp, x-axis double, y-axis double);

DB error: syntax error near "-axis double, y-axis double);" (0.019247s)
taos> 

Solution

  • maybe you can try it with back quote like this:

    create table tt (ts timestamp, `x-axis` double, `y-axis` double);