我想在 SQL ServerVariables
中复制行。VariablesTest
两者具有相同的列、数据类型等。阅读下面的答案,我想这是要走的路
set IDENTITY_INSERT VariablesTest ON
insert VariablesTest Select * from Variables
set IDENTITY_INSERT VariablesTest OFF
但 SQL Server Management Studio 会引发错误:
An explicit value for the identity column in table 'VariablesTest' can only be specified when a column list is used and IDENTITY_INSERT is ON.
叹...