gpt4 book ai didi

sql-server - 更新 Transact SQL 链接表时影响了太多行错误

转载 作者:行者123 更新时间:2023-12-04 02:03:26 29 4
gpt4 key购买 nike

我正在尝试使用此更新链接表...

update openquery (LINKSERVERID, 'select tng_email from user_list where tng_id = 62873') 
set tng_email = 'blah@blah.com';

...但我收到以下错误...

OLE DB provider "MSDASQL" for linked server "LINKSERVERID" returned message "Key column information is insufficient or incorrect. Too many rows were affected by update.".

仅供引用:tng_id 是主键。

我该如何解决?

最佳答案

我认为您需要在选择查询中包含键,所以试试这个:

update openquery(
LINKSERVERID, 'select tng_id, tng_email from user_list where tng_id = 62873'
) set tng_email = 'blah@blah.com';

关于sql-server - 更新 Transact SQL 链接表时影响了太多行错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31075958/

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