Search code examples
tdengine

is there any way to truncate table in TDengine database?


I know that in some relational database like MySQL, you can truncate table by using

truncate table table_name

Does TDengine support truncate table, or is there any other way to do it?


Solution

  • truncate is not supported in TDengine database, but truncate data from a table can be done by following command:

    delete from table_name
    

    BTW, delete command is only supported by enterprise version