//设置表自增初始值
alter table users AUTO_INCREMENT=10000;
//mysql通过关联字段同步两张表的字段内容
update table_name1 a
set a.content = (select b.content from table_name2 b where a.key= b.key)
where exists (select 1 from table_name2 c where a.key= c.key);
//设置表自增初始值
alter table users AUTO_INCREMENT=10000;
//mysql通过关联字段同步两张表的字段内容
update table_name1 a
set a.content = (select b.content from table_name2 b where a.key= b.key)
where exists (select 1 from table_name2 c where a.key= c.key);
转载于:https://my.oschina.net/u/3911977/blog/2962093