注册

使用mergeInto插入不了数据库

小灰灰 2023/11/22 610 1

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】:dm8
【操作系统】:window
【CPU】:x86
【问题描述】*:表中有关联唯一约束
下面两个字段是关联唯一约束
image.png
merge into data_center.station_alarm as t1 using (select '58447' station_id, '2023-11-22 14:00:00' alarm_time from data_center.station_alarm)
as t2
on t1.station_id = t2.station_id
and t1.alarm_time = t2.alarm_time
when not matched then
insert(station_id,element_type,alarm_value,alarm_time) values('88888','vis',9999999,'2023-11-22 13:00:00')

回答 0
暂无回答
扫一扫
联系客服