Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting a unique key to be used across tables
Message
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00955413
Message ID:
00956069
Views:
10
Hi Kevin,

Why don't you let SQL Server to do this for you?
Make CurrTransNo column identity.
All that you will need to is to insert a new record and to call @@IDENTITY system function.
Yes, this approach has the disadvantage that the table will grow, but you can delete unused entries at any time.

Regards,
Venelina Jordanova

Outsourcing IT Services Ltd.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform