Help Center/ MapReduce Service/ Component Operation Guide (LTS)/ Using HetuEngine/ Common HetuEngine SQL Syntax/ HetuEngine DML SQL Syntax/ UPDATE
Updated on 2025-03-17 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
What is your overall rating for this page?
0
1
2
3
4
5
6
7
8
9
10
Very dissatisfiedVery satisfied
Thank you very much for your feedback. We will continue working to improve the documentation.
The system is busy. Please try again later.