• CELKO (8/22/2014)


    What do you use for the PK on lookup tables?

    I use the encoding that is being used. The IDENTITY property (not a column!) is the count of insertion attempts that was made to that disk on that one machine.

    Example: look up table for two-letter state codes using the two letter code as PK. What would IDENTITY mean? How would it improve anything?

    If you go international and start getting repeated codes, unless you change your table and PK definition because the previous design would become a failure.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2