问题现象:有张表原来设计的时候,主键id并没有设置自增,后来发现是已经有很多数据,需要修改已经存在的id,
解决:update trade_info,( SELECT @num := 0 ) r set id = @num:=@num+1