我想根据以下代码向PostgreSQL的临时表中插入值。
declare @output table (AuditScratchID bigint, AuditID bigint);
merge table atb
using (select
s.ID
....
....
....
from @temporaryTableVariable s
inner join ....
...............
..............
) as s
on 1 = 2 -- Impossible Condition so they never match
when not matched then
insert (.....)
values (.....)
output s.ID, inserted.ID
into @output;
仅仅提一下,我如何将值关联到临时表中
on 1 = 2 - 不可能的条件,因此它们永远不会匹配
。 - Andronicus