如果是取最大值
最好用select max(id) from tbname for update;
方式两种方式同时使用?不使用触发器实现的?