Mysql存储过程遍历问题

ithoney 2012-12-11 10:46:56
一张表user
id name grade time
1 111 null 2012-12-01
2 222 null 2012-12-02
3 333 null 2012-12-01

我根据时间比如2012-12-01,大于这个时间的都搜出来,然后将每个grade字段分别更新和name值一样的!

遍历不会!!!,求解~
...全文
117 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
chute 2012-12-17
  • 打赏
  • 举报
回复
引用 4 楼 ithoney 的回复:
引用 3 楼 zhaofei466 的回复:update user set grade = time where id in (select id from user where time > 2012-12-01)谢谢
ithoney 2012-12-16
  • 打赏
  • 举报
回复
引用 3 楼 zhaofei466 的回复:
update user set grade = time where id in (select id from user where time > 2012-12-01)
谢谢
ithoney 2012-12-12
  • 打赏
  • 举报
回复
求解啊求解啊
chute 2012-12-12
  • 打赏
  • 举报
回复
update user set grade = time where id in (select id from user where time > 2012-12-01)
ithoney 2012-12-11
  • 打赏
  • 举报
回复
存储过程刚刚接触,~

81,091

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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