开发者社区 问答 正文

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

展开
收起
蛮大人123 2016-02-11 14:43:17 1667 分享 版权
1 条回答
写回答
取消 提交回答
  • 我说我不帅他们就打我,还说我虚伪

    update a set aa=1 where id = 1

    2019-07-17 18:40:43
    赞同 展开评论