请教1个关于delete语句的小问题。

edgethinking 2015-05-04 04:50:07
我用的版本是mySql6.0, 执行下面语句的时候,
delete from t_bd_goodsshopinfo where fid in (select fid from t_bd_goods)

报错:Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode,
toggle the option in Preferences -> SQL Queries and reconnect. 0.000 sec

可是我执行 delete from t_bd_goodsshopinfo where fid in (1, 2)却是可以的。请问1下,这个是什么原因呢? 多谢了!
...全文
67 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
edgethinking 2015-05-04
  • 打赏
  • 举报
回复
可以了,非常感谢。
edgethinking 2015-05-04
  • 打赏
  • 举报
回复
引用 1 楼 ACMAIN_CHM 的回复:
You are using safe update mode 您在使用安全更新模式。
那怎么改变安全更新模式呢?
ACMAIN_CHM 2015-05-04
  • 打赏
  • 举报
回复
You are using safe update mode 您在使用安全更新模式。

56,677

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧