Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing PK column type
Message
De
19/01/2016 13:25:36
 
 
À
19/01/2016 08:56:40
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01629774
Message ID:
01629946
Vues:
48
>>>
>>>OTOH, we also use the 'practice' of using meaningless int fields as PKs and they indeed avoid a lot of problems. OTOH, it does not make any other 'practise' against the relational model or even bad practice.
>>>
>>>Walter,
>>
>>True, but as soon as you write a trigger and try to join
>>INSERTED and DELETED tables as you do it?
>
>I hate to jump in with a simple "good point", but that's a very good point. It's going to have at least some impact on the traditional patterns and processes for audit trail logging.

Nothing is perfect.
Use a fixed number that identifies the row has as a side effect the management of mutual exclusion.

Use an integer identity has the side effect that the values are consumes and you are likely to hit the upper value,
and then delete and insert technique is not recommended.

The best solution has to be chosen case by case basis.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform