开发者社区 问答 正文

SQL怎么在更新的时候加上锁?

update a set aa=1 where id = 1 for update会进行报错..该怎么改?

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'for update of chanceid = 1' at line 1

展开
收起
a123456678 2016-07-01 15:53:32 1927 分享 版权
1 条回答
写回答
取消 提交回答
  • update a set aa=1 where id = 1

    2019-07-17 19:50:11
    赞同 展开评论