mysql受影响的行 0,mySQL UPDATE查询返回“受影响的0行”。
I have this query:UPDATE phonecallsSET Called = "Yes"WHERE PhoneNumber = "999 29-4655"My table is phonecalls, I have a column named PhoneNumber.All I want to update is a column named Called to "yes"..
I have this query:
UPDATE phonecalls
SET Called = "Yes"
WHERE PhoneNumber = "999 29-4655"
My table is phonecalls, I have a column named PhoneNumber. All I want to update is a column named Called to "yes".
Any idea what I am doing wrong? when I return my query it says 0 rows affected.
解决方案
As amphetamine and Yada suggested, check with a SELECT, if your phone number is in the table.
But keep in mind: If the value for called of the row in question is already "Yes", mysql won't change the value and will therefore return "0 rows affected". So be sure to also check the current value of called
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐


所有评论(0)