MSSQL導(dǎo)入數(shù)據(jù)時(shí)啟用標(biāo)識(shí)插入選項(xiàng)作用
作者:佚名 時(shí)間:2012-04-29 分享到:
如果目標(biāo)表中id字段是主鍵并且啟用了標(biāo)示符,則導(dǎo)入數(shù)據(jù)的時(shí)候必須選擇“啟用標(biāo)識(shí)插入”,否則無(wú)法插入數(shù)據(jù)。
源表:字段:id,name
3 aaa
4 bbb
啟用標(biāo)識(shí)插入:
目標(biāo)表 字段:id,name
3 aaa
4 bbb
如果:源表:字段:name
aaa
bbb
目標(biāo)表 字段:id,name
則啟用標(biāo)識(shí)符插入就會(huì)出錯(cuò)。