mysql产生行号 mysql产生行号: set @n = 0;update tbl_material_stone a, (select stone_id,@n:=@n+1 r from tbl_material_stone order by stone_id) b set no = r where a.stone_id =b.stone_id; ?
mysql产生行号mysql产生行号:
set @n = 0; update tbl_material_stone a, (select stone_id,@n:=@n+1 r from tbl_material_stone order by stone_id) b set no = r where a.stone_id =b.stone_id;
?