Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 133137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:22:37+00:00 2026-05-11T06:22:37+00:00

IGNORE_DUP_KEY = ON basically tells SQL Server to insert non-duplicate rows, but silently ignore

  • 0

IGNORE_DUP_KEY = ON basically tells SQL Server to insert non-duplicate rows, but silently ignore any duplicates; the default behavior is to raise an error and abort the entire transaction when there are duplicates in a column that doesn’t allow them.

I’ve worked with a ton of data that normally has at least one duplicate when there shouldn’t be, so I like to make use of UNIQUE constraints when I know a value shouldn’t have dups; however when I try to bulk load data the last thing I want is for it to get 90% done and then suddenly run into a duplicate and error the whole thing out (Yes, I know the obvious solution is to make sure there are no duplicates, but sometimes I’m just handed a spreadsheet filled with data and told to load it ASAP).

So, what is the reason for having the default be OFF, and why wouldn’t you want it to be on all the time so that any non-dup entries succeed while you don’t have to worry about any duplicates; chances are the duplicates are in there by mistake anyway.

Is it related to performance, or something else? This seems like a great idea, but there’s got to be some reason why it’s not the default behavior.

Mainly, is there a good reason not to use this that I should be aware of, or should it be up for evaluating on a case-by-case basis?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T06:22:38+00:00Added an answer on May 11, 2026 at 6:22 am

    Whenever there is a deviation from the ‘normal’ in the database , you probably want to know about it.

    You kept the key unique because of some constraint arising out of business need that dictated it. The database is just keeping up it’s side of the deal saying that ‘hey you wanted this to be unique but now you are saying something contrary. Make up your mind’

    If that is intentional you can ask database to shut up by using IGNORE_DUP_KEY 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a table which should ignore any duplicate value, using SQLCE.
I am trying to ignore the enter key, but i do not want to
I need to ignore routes matching this schema /{controller}/edit/undefined {controller} - could be any
Here I am studying nonclustered indexes on SQL Server Management Studio. I've created a
I am using SQL Server 2008 Enterprise. I have a table and one of
In my database running on SQL Server 2008 R2 I have a special table
I have the following table in SQL Server: CREATE TABLE [dbo].[Users]( [Id] [int] IDENTITY(1,1)
EDIT: I am using MS SQL server 2008 R2 as well. Well, on a
i have a char(10) column in a table in a SQL-Server 2005 database: CREATE
I'm using sql server 2005 the idea is to create a column, update the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.