primary key duplicate record bypass to next insert
问题 weird question. i am inserting 10,000 records or so in a table and the primary key is not an Identity field. so when inserting all 10,000 if some are duplicate, is there a way to skip to next record in sql server insert and make sure the non-duplicates go in? i really dont care bout the duplicates not getting inserted. 回答1: Use the "Ignore duplicate key" option. The simplest way to do this is to delete the Primary Key in SQL Server Management Studio. Then create a new Index, of type "Index",