TRUNCATE
Function
TRUNCATE is specific to DataArts Fabric SQL. It is used to clear table data.
Precautions
External tables do not support TRUNCATE.
Iceberg tables do not support the TRUNCATE PARTITION syntax.
Syntax
1
|
TRUNCATE TABLE table_name [ PARTITIONS (col_name = col_value [, col_name = col_value ]) [, ... ] ]; |
Parameter Description
- table_name
Name of the target table whose data is to be cleared.
Examples
Delete the data of the table partition whose ID is 2.
1
|
TRUNCATE TABLE table_name PARTITIONS (id = 2); |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot