I want to generate 6-digit unique random numbers for my Users table. This unique code is different from table primary key. It should not be sequential and must be in 6-digit format. I have to ignore numbers like 111111, 222222, ...
I can use the Random() class in C# to generate it but the uniqueness is the key.
Is there any solution to do it in C# (or in SQL Server)?