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

阅读 3.1k
1 个回答

update a set aa=1 where id = 1

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题