SQL INSERT but avoid duplicates

前端 未结 6 986
北荒
北荒 2020-12-31 10:42

I want to do some quick inserts but avoid duplicates into a Table. For argument\'s sake lets call it MarketPrices, I\'ve been experimenting with two ways of doing it but not

6条回答
  •  既然无缘
    2020-12-31 11:07

    if you don't need to trap duplicates, you can always create a unique index with "ignore duplicates" set to true. SQL Server will take care of this for you.

提交回复
热议问题