Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing PK column type
Message
From
19/01/2016 13:25:36
 
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01629774
Message ID:
01629946
Views:
51
>>>
>>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform