Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inserting and selecting at the same time
Message
De
23/09/2013 10:22:31
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Desktop
Divers
Thread ID:
01583879
Message ID:
01583887
Vues:
39
An ID should be system generated and meaningless to the user. It should be used for referential integrity and primary keys. It's generally hidden from the user. If the user needs something special beyond that, add an additional field to support it.

>I use a separate table for the autoinc, because optionally users can use their own numbering.
>Besides, I also have a unique key in the table that is handled differently by the framework, and when using autoinc I was forced to use the numeric key as unique field.
>In the business class it was very easy to use another table to handle the numbering, and gives me more flexibility. When doing straight updates in the SQL database that turns out to be a disadvantage.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform