SQL的update多个字段的写法

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';
缘114insert 也可以适⽤。批量插⼊数据
拖把头
insert into persons (id_p, lastname , firstName, city ) values (select id_,lastname,forstName,city from personA wehere id_p<"123")insert into persons
(id_p, lastname , firstName, city )
values
(200,'haha' , 'deng' , 'shenzhen'),
(201,'haha2' , 'deng' , 'GD'),
梭织机(202,'haha3' , 'deng' , 'Beijing');

本文发布于:2024-09-23 14:27:27,感谢您对本站的认可!

本文链接:https://www.17tex.com/tex/1/277492.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:拼接   系统   字段   采摘   数据
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议