Home  >  Article  >  Database  >  mysql-MYSQL INNODB表锁和行锁的问题

mysql-MYSQL INNODB表锁和行锁的问题

WBOY
WBOYOriginal
2016-06-06 09:45:041066browse

mysql锁innodb

Id是主键。以下语句分别是行锁还是表锁?
第一句:update Table set X=1 where Id IN (1,2,4,7);
第二句:update Table set X=1 where Id Between 1 AND 10;
第三句:update Table set X=1 where Id>=1 AND Id

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn