If you choose any increment that is not a factor of 1,000,000, you can take the last 6 digits of this number to provide an identifier; those. (IDENTITY (1,7)) % 1000000 .
But your competitors could still find growth by several consecutive registrations, so this would not completely solve the problem.
Thus, it seems to you that you want the number to be completely random - so for this you will need to check whether it already exists at its creation or pre-generate a list of numbers, sort them randomly and choose the next one when creating a new client.
Another consideration is some form of encryption, if you can find or create an appropriate algorithm that creates a fairly short output.
If you take a large zoom path without a factor, you can subsequently order the order of the digits to create a more random number - for example,
declare @inc int , @loop int declare @t table (i int, cn int, code varchar(4)) select @inc = 5173, @loop = 1 while @loop<=10000 begin insert @t (i, cn) select @loop, (@inc*@loop)%10000 select @loop = @loop + 1 end update @t set code = substring(convert(varchar(4),cn),2,1) + substring(convert(varchar(4),cn),4,1) + substring(convert(varchar(4),cn),3,1) + substring(convert(varchar(4),cn),1,1) select code, count(*) from @t group by code having count(*)>1 select top 20 * from @t order by i
Depending on the number you select, some consecutive elements will have the same difference between them, but this number will be different. So this is not cryptographically secure, but probably enough to interfere with all but the most determined competitors.
You can convert the above to a function to run the standard IDENTITY(1,1) id field