肩膀麻木是什么原因引起的| 八月六号是什么星座| 半永久是什么意思| 吃什么食物补铁| 梦见洗碗是什么预兆| 鱼腥草与什么相克| 脉搏强劲有力代表什么| 好人卡什么意思| 搞笑是什么意思| 射手男和什么座最配对| 7月5日什么星座| 脸上发红是什么原因| 月经血块是什么原因| 地图舌是什么原因引起的| 子宫囊肿有什么症状| 中医五行属什么| 下午4点到5点是什么时辰| 什么人容易得多囊卵巢| 背靠背协议是什么意思| 血脂高吃什么好| 脑出血什么原因引起的| 拉屎为什么是黑色的| 心衰什么症状| 中国黄金为什么比其它金店便宜| 私通是什么意思| 比细菌还小的东西是什么| 艾滋病是什么症状| 初级会计什么时候报名| 吃什么对脾胃有好处| 什么是虫草| 什么东西止血最快最好| 你要干什么| 食色性也是什么意思| 智齿长什么样子| 6月26什么星座| 鸡汤用什么鸡| 胃功能四项检查是什么| 什么是pin| 老年人尿血是什么原因| 桥本甲状腺炎是什么意思| 神经外科主要看什么病| 为什么会突然吐血| 二氧化硅是什么东西| 酒花浸膏是什么| 豆芽不能和什么一起吃| eva是什么材料| 女人吃什么补气血效果最好| 吃菠萝蜜有什么好处| 炎性增殖灶是什么意思| 盆腔炎做什么检查能查出来| 七月13号是什么星座| 红萝卜什么时候种| 吃核桃有什么好处| 发晕是什么原因引起的| 坐月子能吃什么零食| 胸闷是什么症状| 1980年是什么年| 脚抽筋什么原因| 肝火是什么原因引起的| 152是什么意思| 百福骈臻是什么意思| 睾丸扭转有什么症状| 奕字五行属什么| 巴利属于什么档次的| 老虎属于什么科动物| 海马萎缩是什么情况| 低级别上皮内瘤变是什么意思| 颈椎痛吃什么药| alp是什么意思| 血癌是什么原因造成的| 鳞状上皮是什么意思| 司南是什么| 淑女气质给人什么感觉| 睡眠障碍应该挂什么科室| 学位证书有什么用| 感光是什么意思| 朱砂是什么做的| 雪菊有什么功效| 什么是琥珀| 用你的手解我的锁是什么歌| 过继是什么意思| 阴人是什么意思| 袢是什么意思| 精卫填海是什么故事| 注音是什么| 现在有什么好的创业项目| 脾虚湿蕴证是什么意思| 膀胱过度活动症吃什么药| 女人手脚发热吃什么药| 阑尾炎可以吃什么| 莫须有什么意思| cocoon是什么品牌| 东吴是现在的什么地方| 5月26号是什么日子| 2000年龙是什么命| 什么子孙| 女性尿特别黄是什么原因| 什么的天空| 未时属什么生肖| 女人怀孕的最佳时间是什么时间| 商字五行属什么| 什么是忧郁症| 纸老虎是什么意思| 磁力链接是什么| 尿生化是查什么的| 买手是什么职业| 丹参滴丸和丹参片有什么区别| 均质是什么意思| 什么是大男子主义| 2034年是什么年| 孩子积食发烧吃什么药| 来姨妈为什么是黑色的血| 无偿是什么意思| hb是什么意思医学| 已加一笔是什么字| 什么鞋不能穿| champion什么牌子| 浑身没劲什么原因| 肺炎咳嗽吃什么药| 巨蟹座和什么座最配对| 什么牌子的氨糖最好| 孕妇羊水多是什么原因造成的| 流泪痣是什么意思| 寻常疣是什么原因造成的| 辅酶q10有什么作用| 低血糖吃什么水果| 小孩尿味道很重是什么原因| 女人乳房疼是什么原因| 袁字五行属什么| 9.7号是什么星座| esp是什么意思| 老年人腿肿是什么原因引起的| 梦见放生鱼是什么意思| 八月生日什么星座| 红豆和赤小豆有什么区别| 空心菜又叫什么菜| 省油的灯是什么意思| 生完孩子可以吃什么水果| 油嘴滑舌是什么意思| 肾病挂什么科| 羊水为什么叫羊水| 经常头痛吃什么药效果好| 抑郁症挂什么科室| 便秘吃什么药快速排便| 属牛男最在乎女人什么| 什么是石女| 什么的照射| 25是什么生肖| 祖宗是什么意思| 01年属什么生肖| 沅字五行属什么| 廿二是什么意思| 美甲光疗是什么| 信阳毛尖是什么茶| 吃东西就吐是什么原因| eee是什么牌子的鞋| 阴虱长什么样| 精卫填海是什么故事| 肛塞有什么作用| 骨质增生什么意思| 朋友圈为什么发不出去| 杰字五行属什么| 簸箕是什么意思| 教授相当于什么级别| 泡饭为什么对胃不好| et什么意思| 芒果是什么季节的| 肝肾阴虚吃什么中成药| 面色无华什么意思| 群像是什么意思| 松子是什么树的果实| 金青什么字| b27是什么检查| 什么酒好喝| 舌苔开裂是什么原因呢| 为什么腋下有异味| 成人补锌吃什么药| 吃什么能丰胸| 火字旁有什么字| 人格是什么| 当医生学什么专业| 紫外线过敏用什么药| 霉点用什么可以洗掉| 3朵玫瑰代表什么意思| 吃百合有什么好处| 回民为什么不吃猪肉| 外甥是什么关系| 夏天怕冷是什么原因| 蜥蜴什么动物| 夏天喝什么茶最好| 五年生存率是什么意思| 气体交换受损与什么有关| 支气管激发试验阴性是什么意思| 虹膜是什么意思| 一个令一个瓦念什么| 乳头瘙痒是什么原因| 牙龈黑紫色是什么原因| 生化是什么| 金樱子配什么才壮阳| 99新是什么意思| 夜咳嗽是什么原因| 缠足是什么时候开始的| 核桃什么时候成熟| 85年属于什么生肖| 冬眠灵是什么药| 空气过敏是什么症状| 什么动物可以贴在墙上| 手抖是什么原因导致的| 什么东西补钙| 燕子喜欢吃什么| hc是什么意思| 新生儿ad滴剂什么时候吃最好| 笑哭表情什么意思| 没事找事是什么意思| 矫正是什么意思| 小腿经常抽筋是什么原因| gd是什么元素| 东方蝾螈吃什么| 婴儿拉肚子是什么原因造成的| 脚臭是什么原因引起的| 太上老君的坐骑是什么| 手痛挂什么科| 职业年金什么时候领取| 吃什么保养皮肤| 揽件是什么意思| 什么的跳舞| 裤裙配什么上衣好看| 贬义词是什么意思| 内能与什么因素有关| 毫不犹豫的意思是什么| 睡莲和碗莲有什么区别| 天冬与麦冬有什么区别| 流鼻涕是什么原因| 胆固醇高吃什么食物好| 奋笔疾书的疾是什么意思| 健脾益气是什么意思| 魔术贴是什么| 没有润滑油用什么代替| 脑白质变性是什么意思| 胆囊检查做什么检查| tct检查什么项目| 脸上白了一小块是什么原因| 辅料是什么意思| 杨柳是什么生肖| 一根长寿眉预示什么| 凝视的近义词是什么| 四维什么时候做最佳| 儿童说话不清楚挂什么科| 芒硝有什么作用| 感冒吃什么药| 喝山楂水有什么功效与作用| 蓝莓是什么颜色| 宝诰是什么意思| 手指甲有月牙代表什么| 安之若素什么意思| 3个土念什么| 什么是前奶什么是后奶| 八带是什么| 一什么书桌| 乳腺小叶增生是什么意思| 最好的避孕方法是什么| 什么牌的笔记本电脑好| 木丹念什么| 玄关是什么| 百度Jump to content

《三国志荣耀》绿色度测评报告

From Wikipedia, the free encyclopedia
百度 一个是要防范系统性风险的发生,另一个是要把中国的事情做好。

A relational database management system uses SQL MERGE (also called upsert) statements to INSERT new records or UPDATE or DELETE existing records depending on whether condition matches. It was officially introduced in the SQL:2003 standard, and expanded[citation needed] in the SQL:2008 standard.

Usage

[edit]
MERGE INTO tablename USING table_reference ON (condition)
  WHEN MATCHED THEN
    UPDATE SET column1 = value1 [, column2 = value2 ...]
  WHEN NOT MATCHED THEN
    INSERT (column1 [, column2 ...]) VALUES (value1 [, value2 ...]);

A right join is employed over the Target (the INTO table) and the Source (the USING table / view / sub-query)--where Target is the left table and Source is the right one. The four possible combinations yield these rules:

  • If the ON field(s) in the Source matches the ON field(s) in the Target, then UPDATE
  • If the ON field(s) in the Source does not match the ON field(s) in the Target, then INSERT
  • If the ON field(s) does not exist in the Source but does exist in the Target, then no action is performed.
  • If the ON field(s) does not exist in either the Source or Target, then no action is performed.

If multiple Source rows match a given Target row, an error is mandated by SQL:2003 standards. You cannot update a Target row multiple times with a MERGE statement

Implementations

[edit]

Database management systems PostgreSQL,[1] Oracle Database, IBM Db2, Teradata, EXASOL, Firebird, CUBRID, H2, HSQLDB, MS SQL, MonetDB, Vectorwise and Apache Derby support the standard syntax. Some also add non-standard SQL extensions.

Synonymous

[edit]

Some database implementations adopted the term upsert (a portmanteau of update and insert) to a database statement, or combination of statements, that inserts a record to a table in a database if the record does not exist or, if the record already exists, updates the existing record. This synonym is used in PostgreSQL (v9.5+)[2] and SQLite (v3.24+).[3] It is also used to abbreviate the "MERGE" equivalent pseudo-code.

It is used in Microsoft Azure SQL Database.[4]

Other non-standard implementations

[edit]

Some other database management systems support this, or very similar behavior, through their own, non-standard SQL extensions.

MySQL, for example, supports the use of INSERT ... ON DUPLICATE KEY UPDATE syntax[5] which can be used to achieve a similar effect with the limitation that the join between target and source has to be made only on PRIMARY KEY or UNIQUE constraints, which is not required in the ANSI/ISO standard. It also supports >REPLACE INTO syntax,[6] which first attempts an insert, and if that fails, deletes the row, if exists, and then inserts the new one. There is also an IGNORE clause for the INSERT statement,[7] which tells the server to ignore "duplicate key" errors and go on (existing rows will not be inserted or updated, but all new rows will be inserted).

SQLite's INSERT OR REPLACE INTO works similarly. It also supports REPLACE INTO as an alias for compatibility with MySQL.[8]

Firebird supports MERGE INTO though fails to throw an error when there are multiple Source data rows. Additionally there is a single-row version, UPDATE OR INSERT INTO tablename (columns) VALUES (values) [MATCHING (columns)], but the latter does not give you the option to take different actions on insert versus update (e.g. setting a new sequence value only for new rows, not for existing ones.)

IBM Db2 extends the syntax with multiple WHEN MATCHED and WHEN NOT MATCHED clauses, distinguishing them with ... AND some-condition guards.

Microsoft SQL Server extends with supporting guards and also with supporting Left Join via WHEN NOT MATCHED BY SOURCE clauses.

PostgreSQL supports merge since version 15 but previously supported merging via INSERT INTO ... ON CONFLICT [ conflict_target ] conflict_action.[9]

CUBRID supports MERGE INTO[10] statement. And supports the use of INSERT ... ON DUPLICATE KEY UPDATE syntax.[11] It also supports REPLACE INTO for compatibility with MySQL.[12]

Apache Phoenix supports UPSERT VALUES[13] and UPSERT SELECT[14] syntax.

Spark SQL supports UPDATE SET * and INSERT * clauses in actions.[15]

Apache Impala supports UPSERT INTO ... SELECT.[16]

Usage in NoSQL

[edit]

A similar concept is applied in some NoSQL databases.

In MongoDB the fields in a value associated with a key can be updated with an update operation. The update raises an error if the key is not found. In the update operation it is possible to set the upsert flag: in this case a new value is stored associated to the given key if it does not exist, otherwise the whole value is replaced.

In Redis the SET operations sets the value associated with a given key. Redis does not know any detail of the internal structure of the value, so an update would have no meaning. So the SET operation has always a set or replace semantics.

See also

[edit]

References

[edit]
  1. ^ "E.1. Release 15". PostgreSQL Documentation. 13 October 2022. Archived from the original on 13 October 2022. Retrieved 13 October 2022.
  2. ^ "PostgreSQL Upsert Using INSERT ON CONFLICT statement". PostgreSQL Tutorial. Archived from the original on Nov 28, 2022.
  3. ^ "upsert", SQLite, visited 6-6-2018.
  4. ^ "MERGE (Transact-SQL)". Transact-SQL Reference (Database Engine). Microsoft Learn. Archived from the original on Jun 24, 2016.
  5. ^ MySQL :: MySQL 5.1 Reference Manual :: 12.2.4.3 INSERT ... ON DUPLICATE KEY UPDATE Syntax
  6. ^ MySQL 5.1 Reference Manual: 11.2.6 REPLACE Syntax
  7. ^ "MySQL 5.5 Reference Manual :: 13.2.5 INSERT Syntax". Retrieved 29 October 2013.
  8. ^ "SQL As Understood By SQLite: INSERT". Retrieved 2025-08-06.
  9. ^ PostgreSQL INSERT page
  10. ^ "New CUBRID 9.0.0". CUBRID Official Blog. 2025-08-06. Retrieved 2025-08-06.
  11. ^ CUBRID :: Data Manipulation Statements :: Insert :: ON DUPLICATE KEY UPDATE Clause
  12. ^ CUBRID :: Data Manipulation Statements :: Replace
  13. ^ "UPSERT VALUES".
  14. ^ "UPSERT SELECT".
  15. ^ "MERGE INTO (Delta Lake on Databricks)".
  16. ^ "UPSERT Statement (Apache Impala Documentation)".
[edit]
80年属猴的是什么命 药流没流干净有什么症状 手腕血管疼是什么原因 炼乳是什么东西 花对什么
怀孕血压高对胎儿有什么影响 胃病有什么症状 中国精神是什么 梦见卖东西是什么意思 当兵什么时候入伍
四面八方是什么意思 maxrieny是什么品牌 交警中队长是什么级别 三个犬念什么 甘油三酯是什么意思
荔枝肉是什么菜系 针灸后需要注意什么 什么叫水印 什么烧鸭子好吃 混动是什么意思
述求是什么意思hcv8jop8ns5r.cn 水奶和奶粉什么区别hcv9jop8ns3r.cn 藕不能和什么一起吃hlguo.com 如来佛祖和释迦牟尼是什么关系hcv8jop6ns3r.cn 办护照需要什么条件hcv9jop4ns3r.cn
右额头上有痣代表什么bysq.com nt检查什么内容cl108k.com 重复肾是什么意思hcv7jop5ns5r.cn 为什么会长息肉hcv9jop8ns0r.cn 爱吐口水是什么原因jasonfriends.com
ca199是什么检查项目hcv8jop1ns2r.cn 小便发红是什么原因clwhiglsz.com 茎是什么意思hcv8jop3ns5r.cn 时过境迁是什么意思hcv8jop9ns0r.cn 木薯粉是什么做的hcv8jop8ns8r.cn
鱼油对身体有什么好处hcv7jop5ns3r.cn 陌上花开可缓缓归矣什么意思hcv8jop6ns0r.cn 天伦之乐什么意思aiwuzhiyu.com 议员在中国相当于什么hcv8jop6ns5r.cn 什么心竭什么hcv8jop0ns0r.cn
百度