帮改写个MySQL语句

谁学逆向工程 2018-06-19 11:34:03
string ttt = "update phonenumber set sendtime=null where
strcmp(LEFT(sendtime,2),'11')=0 or strcmp(right(sendtime,2),'32')=0";

要求,当sendtime字段左边两个字符等于11,并且sendtime右侧两个字符等于32的时候什么也不做,如果两边有一个不等,则把这个字段设为null
...全文
246 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
正怒月神 2018-06-19
  • 打赏
  • 举报
回复
你不是都写得差不多了吗。。。只是稍微有点问题
update phonenumber set sendtime=null 
where left(password,2)<>11 or right(password,2)<>32

110,533

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

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