行级锁又称为悲观锁 for update 如下(必须要等这个for updaste事务执行完毕以后,剩下的sql语句才可以去执行) 转载于:https://www.cnblogs.com/suanshun/p/6739915.html