Hi Jim,
Please could you explain me how u arrived the figure 2,000,000,000.
For surrogate PK, I usually take the recc() and add 1 to it then, convert it
to the base 36 and store. I do this by giving Default Value of PK as
Base36( recc()+1 ). Where Base36 is an UDF which converts decimal to base 32.
Is there a better way of doing this?
TIA,
Biju
> The enforcement of PK and Candidate indexes is according to the rules of
> relational databases. The rules state that a Primary or candidate key is
> absolutely Unique within the table. Set deleted on does NOT remove the
> record from the table, the record is still there and still has that key,
> and the record could be recalled in the future So the behavior you see is
> the only way it could ever work.
>
> To solve the perceived problem with this, use surrogate keys so you don't
> care what the value is as long as it is unique. Don't ever reuse a key.
> If you use Integer field for this you are limited to only 2,000,000,000
> positive values stored in 4 bytes.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only