MERGE语句在Informix v10中不起作用 [英] MERGE Statement is not working in Informix v10

查看:184
本文介绍了MERGE语句在Informix v10中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用merge语句在Informix v10.0中插入/更新 但会引发语法错误:

I tried to use the merge statement to Insert/Update in Informix v10.0 but it throws a Syntax Error:

create table source(id int, account int, age int);
create table target (id int, account int, age int);

insert into source values(1, 1200, 25);
insert into source values(2, 1300, 28);
insert into source values(3, 1400, 45);

merge into target t 
using source s on t.id = s.id
when matched then
update
set t.id = s.id, t.account = s.account, t.age = s.age
when not matched then
insert (t.id, t.account, t.age)
values (s.id, s.account, s.age);

select * from target;

能请你帮忙吗?

推荐答案

MERGE语句在Informix 10.00中不可用.它是在11.50中添加的-请参见 SQL语法手册中的MERGE语句. 新功能页面建议将其添加到11.50.xC6中,这是整个维护发布周期的一部分.

The MERGE statement was not available in Informix 10.00. It was added in 11.50 — see the MERGE statement in the SQL syntax manual. The new features page suggests it was added in 11.50.xC6, part of the way through the maintenance release cycle.

请注意,不支持版本10.00和所有11.x版本(11.10、11.50、11.70). 11.70版本在2020-10-01不再支持.

Note that version 10.00 and all the 11.x versions (11.10, 11.50, 11.70) are unsupported. Version 11.70 went out of support on 2020-10-01.

这篇关于MERGE语句在Informix v10中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆