mysql 某一字段 手动实现自增
查询一个字段的最大值 然后+1 再插入数据中
查到最大值+1
select max(sequence) +'1'
from make_sample_technology_process_product;
把最大值插入 id='7'的数据
update make_sample_technology_process_product
set sequence = ? where id='7'
这两句都可以用 加在一起就不行了
update make_sample_technology_process_product
set sequence =select max(sequence) +'1'
from make_sample_technology_process_product
where id = '7';