Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can an identity column be zero?
Message
De
28/11/2010 11:00:55
 
 
À
27/11/2010 18:07:10
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01490715
Message ID:
01490754
Vues:
54
Thanks, Naomi Sergey,and Kevin

The question was provoked by another one:

I'm wondering what's the best (translate that - reliable and least work for me) way to determine whether a row in a datatable that contains an identity column was inserted by my C# program or was originally extracted from a SQL server row.
When browsing the datatable in the debugger, I see a -1 in the rows that I've created


Can I say that if it's less than 0, it was inserted by me and vice versa?

Is that logic OK? Is there a better way?


>>checked the documentation and can't find an answer to this.
Will an identify column ever have a value of zero?
I note that when I add the first record, it's 1.
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform