update restated_notice_tbl set restated_notice_tbl.restated='已回复' where restated_notice_tbl.issue=(select info_report_tbl.issue from info_report_tbl,restated_notice_tbl where info_report_tbl.issue=restated_notice_tbl.issue and info_report_tbl.report_type='0' and info_report_tbl.del_row='0' and info_report_tbl.title='nihaoma');
报YOU canot specify target table ‘restated_notice_tbl’ for update in from clause错误
把,restated_notice_tbl去掉就好了,因为update的是restated_notice_tbl这张表。
本文介绍了一种常见的SQL更新语句错误:“不能在FROM子句中指定目标表进行更新”。文章通过一个具体的例子展示了如何识别该错误并提供了解决方案,即去除更新表名在FROM子句中的重复出现。
9969

被折叠的 条评论
为什么被折叠?



