delete from user where userid = 20006;
#将查询结果写入变量
select max(repid) into @maxrepid from user;
#设置变量的值
set @maxrepid = @maxrepid+1;
#查询变量值
select @maxrepid;
#使用变量
update user set repid = @maxrepid,usernumberprefix = '',usertype=1 where userid = 20137;
#将查询结果写入变量
select max(repid) into @maxrepid from user;
#设置变量的值
set @maxrepid = @maxrepid+1;
#查询变量值
select @maxrepid;
#使用变量
update user set repid = @maxrepid,usernumberprefix = '',usertype=1 where userid = 20137;