DELETE RECORDS from CARBON TABLE
Function
This command is used to delete records from a CarbonData table.
Syntax
DELETE FROM CARBON_TABLE [WHERE expression];
Parameter Description
Parameter |
Description |
---|---|
CARBON TABLE |
Name of the CarbonData table in which the DELETE operation is performed |
Precautions
- If a segment is deleted, all secondary indexes associated with the segment are deleted as well.
- If the carbon.input.segments property has been set for the queried table, the DELETE operation fails. To solve this problem, run the following statement before the query:
Syntax:
SET carbon.input.segments. <database_name>.<table_name>=*;
Examples
- Example 1:
delete from columncarbonTable1 d where d.column1 = 'country';
- Example 2:
- Example 3:
delete from columncarbonTable1 where column1 IN (select column11 from sourceTable2);
- Example 4:
delete from columncarbonTable1 where column1 IN (select column11 from sourceTable2 where column1 = '***');
- Example 5:
System Response
Success or failure will be recorded in the driver log and on the client.
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