首页 >数据库 >mysql教程 >mysql发生行号

mysql发生行号

WBOY
WBOY原创
2016-06-07 16:25:301063浏览

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;

?

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn