【发布时间】:2021-03-27 03:17:08
【问题描述】:
我正在尝试实现幂等插入,这个查询看起来很适合这个任务
insert into test_table
select *
from (
values (1, 2, 3, 4),
(3, 4, 5, 6),
(1, 2, 3, 4),
(3, 4, 5, 6)
) as data(a, b, c, d)
where not exists(select 1
from test_table
where test_table.a = data.a
and test_table.b = data.b
and test_table.c = data.c);
请帮助将此查询转换为 jOOQ DSL
我用的是Greenplum数据库,不支持ON CONFLICT语法
【问题讨论】: