Help Center/
MapReduce Service/
Component Operation Guide (LTS)/
Using HetuEngine/
Common HetuEngine SQL Syntax/
HetuEngine DML SQL Syntax/
UPDATE
Updated on 2024-12-13 GMT+08:00
UPDATE
Syntax
UPDATE tablename SET column = value [, column = value ...] [WHERE expression]
Description
This statement is used to update table data based on conditions.
Remarks
- Only the transaction table in ORC format is supported, and the table cannot be an external table.
- The syntax set (column_name1,column_name2, ...) = (value1,value2, ...) is not supported.
Example
-- Create a transaction table. create table upd_tb(col1 int,col2 string) with (format='orc',transactional=true); --Insert data. insert into upd_tb values (3,'A'),(4,'B'); -- Change the value of col1 = 4. update upd_tb set col1=5 where col1=4; -- The col1=4 record is modified. select * from upd_tb; -- col1 | col2 ------|------ 5 | B 3 | A
Parent topic: HetuEngine DML SQL Syntax
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.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot