MAPREDUCE服务 MRS-UPDATE:示例

时间:2024-04-10 09:06:13

示例

-- 创建事务表
create table upd_tb(col1 int,col2 string)  with (format='orc',transactional=true);

--插入数据
insert into upd_tb values (3,'A'),(4,'B');

--修改col1 = 4的数据
update upd_tb set col1=5 where col1=4;

--查询表,col1=4的记录已被修改
select * from upd_tb; -- 
 col1 | col2 
------|------
    5 | B    
    3 | A  
support.huaweicloud.com/cmpntguide-lts-mrs/mrs_01_2499055.html