"當(dāng) IDENTITY_INSERT 設(shè)置為 OFF 時(shí),不能向表? 中的標(biāo)識(shí)列插入顯式值。"表示當(dāng)表的關(guān)鍵子設(shè)置為自動(dòng)生成,那么你不能對(duì)它修改.
posted on 2006-10-30 10:07
Harryson 閱讀(30221)
評(píng)論(11) 編輯 收藏 所屬分類:
SqlServer
FeedBack:
# re: 當(dāng) IDENTITY_INSERT 設(shè)置為 OFF 時(shí),不能向表 中的標(biāo)識(shí)列插入顯式值。[未登錄]
# re: 當(dāng) IDENTITY_INSERT 設(shè)置為 OFF 時(shí),不能向表 中的標(biāo)識(shí)列插入顯式值。[未登錄]
# re: 當(dāng) IDENTITY_INSERT 設(shè)置為 OFF 時(shí),不能向表 中的標(biāo)識(shí)列插入顯式值。
# re: 當(dāng) IDENTITY_INSERT 設(shè)置為 OFF 時(shí),不能向表 中的標(biāo)識(shí)列插入顯式值。
# re: 當(dāng) IDENTITY_INSERT 設(shè)置為 OFF 時(shí),不能向表 中的標(biāo)識(shí)列插入顯式值。
# re: 當(dāng) IDENTITY_INSERT 設(shè)置為 OFF 時(shí),不能向表 中的標(biāo)識(shí)列插入顯式值。
# re: 當(dāng) IDENTITY_INSERT 設(shè)置為 OFF 時(shí),不能向表 中的標(biāo)識(shí)列插入顯式值。
# re: 當(dāng) IDENTITY_INSERT 設(shè)置為 OFF 時(shí),不能向表 中的標(biāo)識(shí)列插入顯式值。
# re: 當(dāng) IDENTITY_INSERT 設(shè)置為 OFF 時(shí),不能向表 中的標(biāo)識(shí)列插入顯式值。
2009-02-12 21:12 |
設(shè)置了標(biāo)識(shí)列就不用管它了,如果想通過SQL語名插入的話,就先把IDENTITY_INSERT 設(shè)置為 ON
如下
set IDENTITY_INSERT 表名 ON
回復(fù) 更多評(píng)論
# re: 當(dāng) IDENTITY_INSERT 設(shè)置為 OFF 時(shí),不能向表 中的標(biāo)識(shí)列插入顯式值。
# re: 當(dāng) IDENTITY_INSERT 設(shè)置為 OFF 時(shí),不能向表 中的標(biāo)識(shí)列插入顯式值。