gpt4 book ai didi

Azure 突触 : Merge command with the identity column in target table is not working

转载 作者:行者123 更新时间:2023-12-03 02:32:22 25 4
gpt4 key购买 nike

尽管我们没有更新/插入标识列,但对具有标识列的目标表执行合并命令会出错。请找到以下代码片段和错误消息

消息 8102,第 16 级,状态 1,第 7 行无法更新身份列“id”。

CREATE TABLE dbo.t1 (id INT IDENTITY(1,1), Sub INT, Metric INT) WITH (DISTRIBUTION = HASH(Sub), CLUSTERED COLUMNSTORE INDEX);

;WITH SRC AS (SELECT 1 AS Sub, 100 AS Metric) MERGE dbo.t1 AS tgt USING SRC ON tgt.Sub = SRC.Sub WHEN MATCHED THEN UPDATE SET Metric = SRC.Metric WHEN NOT MATCHED THEN INSERT (Sub, Metric) VALUES (SRC.Sub, SRC.Metric);

错误:enter image description here

最佳答案

已向产品团队报告错误,将在未来版本中修复

关于Azure 突触 : Merge command with the identity column in target table is not working,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64563484/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com