• 使用@@IDENTITY

    例如:insert into student(name,age) values('fanqi',23) select @@identity

  • 使用 OUTPUT inserted

    例如:INSERT INTO UserInfo(Username,LogName,[Password],resTime) OUTPUT inserted.UserID VALUES ('12345','56789','112233',GETDATE())

相关文章:

  • 2022-12-23
  • 2021-05-13
  • 2021-09-30
  • 2021-10-24
  • 2021-04-09
  • 2022-12-23
  • 2021-06-02
  • 2022-02-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-17
  • 2022-12-23
  • 2022-02-07
  • 2022-03-01
  • 2021-10-13
相关资源
相似解决方案