insert into mst_sequence(seq_type, seq_desc, seq_date, seq_no, create_time) VALUES('CK', 'XXX', NOW(), 1, NOW())
on DUPLICATE key UPDATE seq_no=seq_no+1;

需要对seq_type和seq_date两字段建立唯一索引,否则,每次都插入新记录。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-08
  • 2022-12-23
  • 2022-12-23
  • 2021-10-03
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-02
  • 2022-12-23
  • 2021-11-04
  • 2021-12-21
相关资源
相似解决方案