Solved

CONSTRAINT  (IGNORE_DUP_KEY = OFF)

Posted on 2007-04-05
2
2,737 Views
Last Modified: 2008-02-01
Hi,

I have a script to create a table in which there is a CONSTRAINT, can somebody explain what this CONSTRAINT would achive.

CONSTRAINT [PK_CategoryCategoryHistory] PRIMARY KEY CLUSTERED
(
      [ParentCategoryID] ASC,
      [ChildCategoryID] ASC,
      [SiteLangID] ASC,
      [ParentVersion] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

And also is there a site that would list all the key words used in sql server and explain the usage?
Thanks

0
Comment
Question by:SA4
2 Comments
 
LVL 10

Expert Comment

by:lahousden
ID: 18861676
As for the site: www.microsoft.com (look for SQL Server).  But, to be brutally frank,  if you want the experts on this site to do all your work for you you will need to part with more than 50 points a pop...
0
 
LVL 39

Accepted Solution

by:
appari earned 50 total points
ID: 18862202
from BOL

IGNORE_DUP_KEY = { ON | OFF }
Specifies the error response to duplicate key values in a multiple-row insert operation on a unique clustered or unique nonclustered index. The default is OFF.

ON
A warning message is issued and only the rows violating the unique index fail.

OFF
An error message is issued and the entire INSERT transaction is rolled back.

The IGNORE_DUP_KEY setting applies only to insert operations that occur after the index is created or rebuilt. The setting has no affect during the index operation.

IGNORE_DUP_KEY cannot be set to ON for XML indexes and indexes created on a view.

In backward compatible syntax, WITH IGNORE_DUP_KEY is equivalent to WITH IGNORE_DUP_KEY = ON.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now