我有如下表变量:
declare @TestTable2 as table (A int identity)
我想插入一些值(例如1),而不改变上面的代码行。
我一直在尝试以下操作:
declare @TestTable2 as table (A int identity)
SET IDENTITY_INSERT @TestTable2 ON
INSERT @TestTable2 (A)
VALUES (1)
但是我遇到了一个错误 (在 '@TableTEST2' 附近有语法错误)
我该如何插入列 A
的值?
declare @TestTable2 as table (A int identity) SET IDENTITY_INSERT @TestTable2 ON INSERT @TestTable2 (A) VALUES (1)
- asd