Home > Database > Mysql Tutorial > SQL openquery 删除报错 “键列信息不足或不正确。更新影响到多

SQL openquery 删除报错 “键列信息不足或不正确。更新影响到多

WBOY
Release: 2016-06-07 17:42:59
Original
1535 people have browsed it

) WHERE college_userid IN ( SELECT college_userid FROM #college_student_info) 链接服务器"VERYEAST_MAIN_MYSQL_CONN"的 OLE DB 访问接口 "MSDASQL" 返回了消息 "键列信息不足或不正确。更新影响到多行。"。 消息 7345,级别 16,状态 1,第 207 行 链接

) WHERE college_userid IN(SELECT college_userid FROM #college_student_info)

链接服务器"VERYEAST_MAIN_MYSQL_CONN"的 OLE DB 访问接口 "MSDASQL" 返回了消息 "键列信息不足或不正确。更新影响到多行。"。
消息 7345,香港空间,网站空间,级别 16,状态 1,第 207 行
链接服务器 "VERYEAST_MAIN_MYSQL_CONN" 的 OLE DB 访问接口 "MSDASQL" 无法从表 "SELECT college_userid FROM college_student_information " 删除数据。更新操作不满足架构要求。

原因很简单 表college_student_information 有多条college_userid相同的情况

代码改为

) WHERE college_userid IN(SELECT college_userid FROM #college_student_info)

这样就不会出错了。

 

,服务器空间
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template