如果想给自增列赋值,需先将自增关闭,插入完数据后再打开 

set Identity_insert [tb1] on
GO
INSERT INTO [dbo].[tb1]([ID],[Name],[ClassName])
VALUES
(4,'zhangsan','一班')
GO
set Identity_insert [tb1] off

 

相关文章:

  • 2021-12-18
  • 2021-07-08
  • 2021-09-13
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2022-03-08
猜你喜欢
  • 2022-02-14
  • 2022-12-23
  • 2022-12-23
  • 2021-08-03
相关资源
相似解决方案