java update多个字段的值_SQL的update多个字段的写法
第一種寫法:update a set (c1,c2,c3) =(select c1,c2,c3 from b where......) 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
(200,'haha' , 'deng' , 'shenzhen'),
(201,'haha2' , 'deng' , 'GD'),
(202,'haha3' , 'deng' , 'Beijing');
《新程序員》:云原生和全面數字化實踐50位技術專家共同創作,文字、視頻、音頻交互閱讀總結
以上是生活随笔為你收集整理的java update多个字段的值_SQL的update多个字段的写法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: java hevc和heif_iOS 影
- 下一篇: linux cmake编译源码,linu