如果想给自增列赋值,需要如下设置
set Identity_insert [tb1] on
GO
INSERT INTO [dbo].[tb1]
([ID],[Name]
,[ClassName])
VALUES
(4,'zhangsan'
,'一班')
GO
set Identity_insert [tb1] off
2024-02-09 09:26:46
如果想给自增列赋值,需要如下设置
set Identity_insert [tb1] on
GO
INSERT INTO [dbo].[tb1]
([ID],[Name]
,[ClassName])
VALUES
(4,'zhangsan'
,'一班')
GO
set Identity_insert [tb1] off