javaupdate多个字段的值_SQL的update多个字段的写法第⼀种写法:update a set (c1,c2,c3) =(select c1,c2,c3 from ) where ......;
第⼆种写法⽐较笨:update test set a= '11 ',b = '22 ' where id=1
例如:update omcw_owner.MR_RULE_RECORD
set alarm_rule='1⽉ ⾄ 12⽉: 年度计划 -2 <= 指标值 < 年度计划',warm_rule='1⽉ ⾄ 12⽉: 指标值 < 年度计划 -2'
where alarm_rule='1⽉ ⾄ 12⽉: 年度计划 - -2 <= 指标值 < 年度计划' and warm_rule='1⽉ ⾄ 12⽉: 指标值 < 年度计划 - -2';
insert 也可以适⽤。批量插⼊数据。
insert into persons (id_p, lastname , firstName, city ) values (select id_,lastname,forstName,city from personA wehere id_p
insert into persons
(id_p, lastname , firstName, city )
values
update是什么(200,'haha' , 'deng' , 'shenzhen'),
(201,'haha2' , 'deng' , 'GD'),
(202,'haha3' , 'deng' , 'Beijing');