如何对身份列使用 bcp?

How to use bcp for columns that are Identity?

我想通过下面的代码用 BCP 恢复我的 table。

BCP framework.att.attendance in "D:\test\mhd.txt" -T -c

但列 (id) 在此 table 中是标识。

当使用 BCP 恢复数据时,我希望 id 列保持不变。

换句话说,如果BCP之前第一行的id是'7',我要导入数据,第一行的id还是'7'。

我该怎么办?

BCP IMPORT

-E

  • -E Specifies that identity value or values in the imported data file are to be used for the identity column.
  • If -E is not given, the identity values for this column in the data file being imported are ignored.