1.一般数据表的id都是设置成auto_increment的,所以当插入一条记录后,可以使用下面的命令来获取最新插入记录的id值

1 select last_insert_id();
View Code

相关文章:

  • 2022-12-23
  • 2018-12-05
  • 2021-09-18
  • 2021-09-29
  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
  • 2022-12-23
猜你喜欢
  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
相关资源
相似解决方案