Database-wide unique-yet-simple identifiers in SQL Server

后端 未结 11 816
余生分开走
余生分开走 2020-12-12 12:50

First, I\'m aware of this question, and the suggestion (using GUID) doesn\'t apply in my situation.

I want simple UIDs so that my users can easily communicate this i

11条回答
  •  盖世英雄少女心
    2020-12-12 13:22

    I had a similar situation with a project.

    My solution: By default, users only see the first 7 characters of the GUID.

    It's sufficiently random that collisions are extremely unlikely (1 in 268 million), and it's efficient for speaking and typing.

    Internally, of course, I'm using the entire GUID.

提交回复
热议问题