Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 123»»»

Duplicate value in Identity column Expand / Collapse
Author
Message
Posted Saturday, August 14, 2010 12:46 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Sunday, March 09, 2014 8:27 AM
Points: 166, Visits: 570
Comments posted to this topic are about the item Duplicate value in Identity column

Cheers,
Ankur
Post #969419
Posted Sunday, August 15, 2010 10:17 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Wednesday, March 12, 2014 3:59 AM
Points: 1,938, Visits: 1,149
hi,

I know that we can add explicit values to an identity column using

Identity_Insert on. but i thought that identify column will not allow duplicate columns.good question.lost one point but learned one new point.


Malleswarareddy
I.T.Analyst
MCITP(70-451)
Post #969540
Posted Sunday, August 15, 2010 11:06 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 2:13 AM
Points: 1,865, Visits: 368
good one... duplicates can only be avoided by having a constraint in place...
Post #969545
Posted Monday, August 16, 2010 12:26 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 7:29 AM
Points: 12,206, Visits: 9,168
Nice question. Usually an Identity column is used as a primary key (and thus having a unique clustered index), which will prevent the insertion of duplicate values.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #969568
Posted Monday, August 16, 2010 1:25 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 7:19 AM
Points: 2,814, Visits: 3,851
ziangij (8/15/2010)
good one... duplicates can only be avoided by having a constraint in place...

...or by having a unique index in place.


Best Regards,
Chris Büttner
Post #969580
Posted Monday, August 16, 2010 1:41 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Sunday, March 09, 2014 8:27 AM
Points: 166, Visits: 570
And i thought i only didnt knew it

Cheers,
Ankur
Post #969587
Posted Monday, August 16, 2010 4:57 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, February 06, 2014 4:15 AM
Points: 1,242, Visits: 1,546
Good Question...







Thanks
Vinay Kumar
-----------------------------------------------------------------
Keep Learning - Keep Growing !!!
www.GrowWithSql.com

Post #969680
Posted Monday, August 16, 2010 6:26 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Saturday, March 15, 2014 1:45 PM
Points: 405, Visits: 286
I have to admint I wouldn't have gotten this one right, except for a similar question a few months ago. I still don't understand why one would want to create an identity and then break the rules of the identity. Seems like trouble
Post #969715
Posted Monday, August 16, 2010 6:43 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, April 14, 2014 2:16 PM
Points: 2,812, Visits: 2,543
Identity insert can be very dangerous. For a long time I couldn't see a use for it. Then I needed it to get 2 tables in 2 different databases into sync after they had fallen out of sync for some unknown reason. It saved me a lot of effort.
Post #969725
Posted Monday, August 16, 2010 7:09 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, January 31, 2013 8:01 AM
Points: 1,232, Visits: 1,046
Only one person can insert identity on a column at a time, so WE can not...
Post #969746
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse