锁定表的所有行,排斥其他针对这个表的写操作。确保只有当前事务对指定表进行写操作。 for update 和 for update nowait的区别是,别的事务要对这个表进行写操作时,是等待一段时间还是马上就被数据库系统拒绝而返回。