插入标识列的BCP格式是什么 [英] What will be BCP format for inserting a identity column
问题描述
我在尝试使用BCP将数据插入表时遇到问题.该表具有一个标识列.我正在从文本文件中获取输入.请告诉我是否有好的解决方法.
I am facing problem while I am trying to insert data to a table using BCP. The table has a identity column. I am taking input from a text file. Please let me know if there are any good solutions.
关于, 查颜
推荐答案
我需要做同样的事情,而我的同事指出,您可以使用BCP上的-E开关来做到这一点.
I needed to do the same thing and my colleague pointed out that you can use the -E switch on BCP to do this.
从文档中...
-E指定在标识列中使用导入的数据文件中的一个或多个标识值.如果未指定-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."
请客,谢谢Jan!
这篇关于插入标识列的BCP格式是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!