MYSQL LOCK IN SHARE MODE&FOR UPDATE
2016-04-16 17:03
507 查看
SELECT ... LOCK IN SHARE MODE sets a shared mode lock on the rows read. A shared mode lock enables other sessions to read the rows but not to modify them. The rows read are the latest available, so if they belong to another transaction that has not yet committed, the read blocks until that transaction ends.
SELECT ... FOR UPDATE sets an exclusive lock on the rows read. An exclusive lock prevents other sessions from accessing the rows for reading or writing.
SELECT ... FOR UPDATE sets an exclusive lock on the rows read. An exclusive lock prevents other sessions from accessing the rows for reading or writing.
相关文章推荐
- MYSQL 5.7.12绿色版安装(Windows)
- mysql索引总结----mysql 索引类型以及创建
- Mysql主从复制
- MySQL数据备份之mysqldump使用
- MySQL常用操作
- mysql 5.5.x zip直接解压版安装方法
- MySQL:基础命令(慢慢累积)
- mysql中的当前时间函数
- Mysql 复习
- MySQL安装未响应解决方法
- mysql zip 安装
- MySQL安装
- MySQL5.7的安装与配置
- MySQL多关键字多字段模糊查询
- MySQL主键设计
- mysql查询今天,昨天,近7天,近30天,本月,上一月数据的方法
- MySQL字符串转日期类型
- Mysql的锁
- B+/-Tree原理及mysql的索引分析
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket